WsFrameBase (Apache Tomcat 8.5.12 API Documentation)

org.apache.tomcat.websocket

## Class WsFrameBase

- java.lang.Object
- - org.apache.tomcat.websocket.WsFrameBase

- Direct Known Subclasses:
    WsFrameClient, WsFrameServer

      public abstract class WsFrameBase
      extends Object

  Takes the ServletInputStream, processes the WebSocket frames it contains and extracts the messages. WebSocket Pings received will be responded to automatically without any action required by the application.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ByteBuffer` | `inputBuffer`
    `protected WsSession` | `wsSession`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WsFrameBase(WsSession wsSession, Transformation transformation)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static long` | `byteArrayToLong(byte[] b, int start, int len)`
    `protected abstract Log` | `getLog()`
    `protected Transformation` | `getTransformation()`
    `protected abstract boolean` | `isMasked()`
    `protected boolean` | `isOpen()`
    `protected void` | `processInputBuffer()`
    `protected void` | `sendMessageBinary(ByteBuffer msg, boolean last)`
    `protected void` | `sendMessageText(boolean last)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### wsSession

          protected final WsSession wsSession

    - #### inputBuffer

          protected final ByteBuffer inputBuffer

  - ### Constructor Detail

    - #### WsFrameBase

          public WsFrameBase(WsSession wsSession,
                     Transformation transformation)

  - ### Method Detail

    - #### processInputBuffer

          protected void processInputBuffer()
                                     throws IOException

      Throws:
        `IOException`

    - #### isMasked

          protected abstract boolean isMasked()

    - #### getLog

          protected abstract Log getLog()

    - #### sendMessageText

          protected void sendMessageText(boolean last)
                                  throws WsIOException

      Throws:
        `WsIOException`

    - #### sendMessageBinary

          protected void sendMessageBinary(ByteBuffer msg,
                               boolean last)
                                    throws WsIOException

      Throws:
        `WsIOException`

    - #### byteArrayToLong

          protected static long byteArrayToLong(byte[] b,
                             int start,
                             int len)
                                         throws IOException

      Throws:
        `IOException`

    - #### isOpen

          protected boolean isOpen()

    - #### getTransformation

          protected Transformation getTransformation()

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.