| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final List | byteBufferList
Attribute for the payload of the current continuous frame |
| private static final String | CONNECTION
Handshake specific field for the connection |
| private Framedata | currentContinuousFrame
Attribute for the current continuous frame |
| private IExtension | currentDecodingExtension
Current active extension used to decode messages |
| private IExtension | defaultExtension
Attribute for the default extension |
| private ByteBuffer | incompleteframe
Attribute for the current incomplete frame |
| private List | knownExtensions
Attribute for all available extension in this draft |
| private List | knownProtocols
Attribute for all available protocols in this draft |
| private final Logger | log
Logger instance |
| private int | maxFrameSize
Attribute for the maximum allowed size of a frame |
| private IExtension | negotiatedExtension
Attribute for the used extension in this draft |
| private IProtocol | protocol
Attribute for the used protocol in this draft |
| private final SecureRandom | reuseableRandom
Attribute for the reusable random instance |
| private static final String | SEC_WEB_SOCKET_ACCEPT
Handshake specific field for the accept |
| private static final String | SEC_WEB_SOCKET_EXTENSIONS
Handshake specific field for the extension |
| private static final String | SEC_WEB_SOCKET_KEY
Handshake specific field for the key |
| private static final String | SEC_WEB_SOCKET_PROTOCOL
Handshake specific field for the protocol |
| private static final String | UPGRADE
Handshake specific field for the upgrade |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Draft_6455(IExtension
the extension which should be used for this draft inputExtension)Constructor for the websocket protocol specified by RFC 6455 with custom extensions |
| public | Draft_6455(List<IExtension>
the extensions which should be used for this draft inputExtensions)Constructor for the websocket protocol specified by RFC 6455 with custom extensions |
| public | Draft_6455(List<IExtension>
the extensions which should be used for this draft inputExtensions, List<IProtocol> the protocols which should be used for this draft inputProtocols)Constructor for the websocket protocol specified by RFC 6455 with custom extensions and protocols |
| public | Draft_6455(List<IExtension>
the extensions which should be used for this draft inputExtensions, int the maximum allowed size of a frame (the real payload size, decoded
frames can be bigger) inputMaxFrameSize)Constructor for the websocket protocol specified by RFC 6455 with custom extensions and protocols |
| public | Draft_6455(List<IExtension>
the extensions which should be used for this draft inputExtensions, List<IProtocol> the protocols which should be used for this draft inputProtocols, int the maximum allowed size of a frame (the real payload size, decoded
frames can be bigger) inputMaxFrameSize)Constructor for the websocket protocol specified by RFC 6455 with custom extensions and protocols |
| Modifier and Type | Method and Description |
|---|---|
| public HandshakeState | acceptHandshakeAsClient(ClientHandshake request, ServerHandshake response)
Implements abstract org.
|
| public HandshakeState | acceptHandshakeAsServer(ClientHandshake handshakedata)
Implements abstract org.
|
| private void | |
| private void | checkBufferLimit()
Check the current size of the buffer and throw an exception if the size is bigger than the max allowed frame size |
| private void | |
| private HandshakeState | Returns: MATCHED if it is matched, otherwise NOT_MATCHEDthe requested protocol requestedProtocol)Check if the requested protocol is part of this draft |
| public Draft | copyInstance()
Implements abstract org. Drafts must only be by one websocket at all. |
| public ByteBuffer | createBinaryFrame(Framedata framedata)
Implements abstract org.
|
| private ByteBuffer | |
| public List | createFrames(ByteBuffer binary, boolean mask)
Implements abstract org.
|
| public List | createFrames(String text, boolean mask)
Implements abstract org.
|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| private byte | |
| private String | Returns: a final keythe input string in)Generate a final key from a input string |
| private long | Returns: the size as long (to not get an integer overflow)Get the current size of the resulting bytebuffer in the bytebuffer list |
| public CloseHandshakeType | |
| public IExtension | Returns: the extension which is used or null, if handshake is not yet doneGetter for the extension which is used by this draft |
| public List | Returns: the extensions which are enabled for this draftGetter for all available extensions for this draft |
| public List | Returns: the protocols which are enabled for this draftGetter for all available protocols for this draft |
| private byte | Returns: -128 for true, 0 for falseis mask active or not mask)Get the mask byte if existing |
| public int | Returns: the size, which is allowed for the payloadGetter for the maximum allowed payload size which is used by this draft |
| private ByteBuffer | Returns: a bytebuffer containing all the dataMethod to generate a full bytebuffer out of all the fragmented frame payload |
| public IProtocol | Returns: the protocol which is used or null, if handshake is not yet done or no valid protocolsGetter for the protocol which is used by this draft |
| private byte | Returns: byte that represents which RSV bit is set.Can only be {0, 1, 2, 3} rsv)Get a byte that can set RSV bits when OR(|)'d. |
| private String | |
| private int | Returns: the size bytesthe current buffer mes)Get the size bytes for the byte buffer |
| public int | |
| private void | logRuntimeException(WebSocketImpl
the implementation of the websocket webSocketImpl, RuntimeException the runtime exception e)Log the runtime exception to the specific WebSocketImpl |
| public ClientHandshakeBuilder | postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request)
Implements abstract org.
|
| public HandshakeBuilder | postProcessHandshakeResponseAsServer(ClientHandshake request, ServerHandshakeBuilder response)
Implements abstract org.
|
| public void | processFrame(WebSocketImpl webSocketImpl, Framedata frame)
Implements abstract org. Handle the frame specific to the draft |
| private void | processFrameBinary(WebSocketImpl
the websocket impl webSocketImpl, Framedata the frame frame)Process the frame if it is a binary frame |
| private void | processFrameClosing(WebSocketImpl
the websocket impl webSocketImpl, Framedata the frame frame)Process the frame if it is a closing frame |
| private void | processFrameContinuousAndNonFin(WebSocketImpl
the websocket implementation to use webSocketImpl, Framedata the current frame frame, Opcode the current Opcode curop)Process the frame if it is a continuous frame or the fin bit is not set |
| private void | processFrameIsFin(WebSocketImpl
the websocket impl webSocketImpl, Framedata the frame frame)Process the frame if it is the last frame |
| private void | |
| private void | processFrameText(WebSocketImpl
the websocket impl webSocketImpl, Framedata the frame frame)Process the frame if it is a text frame |
| public void | |
| private byte[] | |
| private Opcode | |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| public List | translateFrame(ByteBuffer buffer)
Implements abstract org.
|
| private Framedata | |
| private void | translateSingleFrameCheckLengthLimit(long
the current payload length length)Check if the frame size exceeds the allowed limit |
| private void | translateSingleFrameCheckPacketSize(int
the max packet size maxpacketsize, int the real packet size realpacketsize)Check if the max packet size is smaller than the real packet size |
| private Draft_6455. | Returns: the new payload data containing new payload length and new packet sizethe buffer to read from buffer, Opcode the decoded optcode optcode, int the old payload length oldPayloadlength, int the max packet size allowed maxpacketsize, int the real packet size oldRealpacketsize)Translate the buffer depending when it has an extended payload length (126 or 127) |
| byteBufferList | back to summary |
|---|---|
| private final List<ByteBuffer> byteBufferList Attribute for the payload of the current continuous frame | |
| CONNECTION | back to summary |
|---|---|
| private static final String CONNECTION Handshake specific field for the connection | |
| currentContinuousFrame | back to summary |
|---|---|
| private Framedata currentContinuousFrame Attribute for the current continuous frame | |
| currentDecodingExtension | back to summary |
|---|---|
| private IExtension currentDecodingExtension Current active extension used to decode messages | |
| defaultExtension | back to summary |
|---|---|
| private IExtension defaultExtension Attribute for the default extension | |
| incompleteframe | back to summary |
|---|---|
| private ByteBuffer incompleteframe Attribute for the current incomplete frame | |
| knownExtensions | back to summary |
|---|---|
| private List<IExtension> knownExtensions Attribute for all available extension in this draft | |
| knownProtocols | back to summary |
|---|---|
| private List<IProtocol> knownProtocols Attribute for all available protocols in this draft | |
| log | back to summary |
|---|---|
| private final Logger log Logger instance
| |
| maxFrameSize | back to summary |
|---|---|
| private int maxFrameSize Attribute for the maximum allowed size of a frame
| |
| negotiatedExtension | back to summary |
|---|---|
| private IExtension negotiatedExtension Attribute for the used extension in this draft | |
| protocol | back to summary |
|---|---|
| private IProtocol protocol Attribute for the used protocol in this draft | |
| reuseableRandom | back to summary |
|---|---|
| private final SecureRandom reuseableRandom Attribute for the reusable random instance | |
| SEC_WEB_SOCKET_ACCEPT | back to summary |
|---|---|
| private static final String SEC_WEB_SOCKET_ACCEPT Handshake specific field for the accept | |
| SEC_WEB_SOCKET_EXTENSIONS | back to summary |
|---|---|
| private static final String SEC_WEB_SOCKET_EXTENSIONS Handshake specific field for the extension | |
| SEC_WEB_SOCKET_KEY | back to summary |
|---|---|
| private static final String SEC_WEB_SOCKET_KEY Handshake specific field for the key | |
| SEC_WEB_SOCKET_PROTOCOL | back to summary |
|---|---|
| private static final String SEC_WEB_SOCKET_PROTOCOL Handshake specific field for the protocol | |
| UPGRADE | back to summary |
|---|---|
| private static final String UPGRADE Handshake specific field for the upgrade | |
| Draft_6455 | back to summary |
|---|---|
| public Draft_6455() Constructor for the websocket protocol specified by RFC 6455 with default extensions
| |
| Draft_6455 | back to summary |
|---|---|
| public Draft_6455(IExtension inputExtension) Constructor for the websocket protocol specified by RFC 6455 with custom extensions
| |
| Draft_6455 | back to summary |
|---|---|
| public Draft_6455(List<IExtension> inputExtensions) Constructor for the websocket protocol specified by RFC 6455 with custom extensions
| |
| Draft_6455 | back to summary |
|---|---|
| public Draft_6455(List<IExtension> inputExtensions, List<IProtocol> inputProtocols) Constructor for the websocket protocol specified by RFC 6455 with custom extensions and protocols
| |
| Draft_6455 | back to summary |
|---|---|
| public Draft_6455(List<IExtension> inputExtensions, int inputMaxFrameSize) Constructor for the websocket protocol specified by RFC 6455 with custom extensions and protocols
| |
| Draft_6455 | back to summary |
|---|---|
| public Draft_6455(List<IExtension> inputExtensions, List<IProtocol> inputProtocols, int inputMaxFrameSize) Constructor for the websocket protocol specified by RFC 6455 with custom extensions and protocols
| |
| acceptHandshakeAsClient | back to summary |
|---|---|
| public HandshakeState acceptHandshakeAsClient(ClientHandshake request, ServerHandshake response) throws InvalidHandshakeException Implements abstract org.
| |
| acceptHandshakeAsServer | back to summary |
|---|---|
| public HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata) throws InvalidHandshakeException Implements abstract org.
| |
| addToBufferList | back to summary |
|---|---|
| private void addToBufferList(ByteBuffer payloadData) Add a payload to the current bytebuffer list
| |
| checkBufferLimit | back to summary |
|---|---|
| private void checkBufferLimit() throws LimitExceededException Check the current size of the buffer and throw an exception if the size is bigger than the max allowed frame size
| |
| clearBufferList | back to summary |
|---|---|
| private void clearBufferList() Clear the current bytebuffer list | |
| containsRequestedProtocol | back to summary |
|---|---|
| private HandshakeState containsRequestedProtocol(String requestedProtocol) Check if the requested protocol is part of this draft
| |
| copyInstance | back to summary |
|---|---|
| public Draft copyInstance() Implements abstract org. Doc from org. Drafts must only be by one websocket at all. To prevent drafts to be used more than once the
Websocket implementation should call this method in order to create a new usable version of a
given draft instance.
| |
| createBinaryFrame | back to summary |
|---|---|
| public ByteBuffer createBinaryFrame(Framedata framedata) Implements abstract org.
| |
| createByteBufferFromFramedata | back to summary |
|---|---|
| private ByteBuffer createByteBufferFromFramedata(Framedata framedata) | |
| createFrames | back to summary |
|---|---|
| public List Implements abstract org.
| |
| createFrames | back to summary |
|---|---|
| public List Implements abstract org.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| fromOpcode | back to summary |
|---|---|
| private byte fromOpcode(Opcode opcode) | |
| generateFinalKey | back to summary |
|---|---|
| private String generateFinalKey(String in) Generate a final key from a input string | |
| getByteBufferListSize | back to summary |
|---|---|
| private long getByteBufferListSize() Get the current size of the resulting bytebuffer in the bytebuffer list
| |
| getCloseHandshakeType | back to summary |
|---|---|
| public CloseHandshakeType getCloseHandshakeType() Implements abstract org.
| |
| getExtension | back to summary |
|---|---|
| public IExtension getExtension() Getter for the extension which is used by this draft
| |
| getKnownExtensions | back to summary |
|---|---|
| public List Getter for all available extensions for this draft
| |
| getKnownProtocols | back to summary |
|---|---|
| public List Getter for all available protocols for this draft | |
| getMaskByte | back to summary |
|---|---|
| private byte getMaskByte(boolean mask) Get the mask byte if existing
| |
| getMaxFrameSize | back to summary |
|---|---|
| public int getMaxFrameSize() Getter for the maximum allowed payload size which is used by this draft
| |
| getPayloadFromByteBufferList | back to summary |
|---|---|
| private ByteBuffer getPayloadFromByteBufferList() throws LimitExceededException Method to generate a full bytebuffer out of all the fragmented frame payload
| |
| getProtocol | back to summary |
|---|---|
| public IProtocol getProtocol() Getter for the protocol which is used by this draft
| |
| getRSVByte | back to summary |
|---|---|
| private byte getRSVByte(int rsv) Get a byte that can set RSV bits when OR(|)'d. 0 1 2 3 4 5 6 7 +-+-+-+-+-------+ |F|R|R|R| opcode| |I|S|S|S| (4) | |N|V|V|V| | | |1|2|3| |
| |
| getServerTime | back to summary |
|---|---|
| private String getServerTime() Generate a date for for the date-header
| |
| getSizeBytes | back to summary |
|---|---|
| private int getSizeBytes(ByteBuffer mes) Get the size bytes for the byte buffer
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| logRuntimeException | back to summary |
|---|---|
| private void logRuntimeException(WebSocketImpl webSocketImpl, RuntimeException e) Log the runtime exception to the specific WebSocketImpl
| |
| postProcessHandshakeRequestAsClient | back to summary |
|---|---|
| public ClientHandshakeBuilder postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request) Implements abstract org.
| |
| postProcessHandshakeResponseAsServer | back to summary |
|---|---|
| public HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request, ServerHandshakeBuilder response) throws InvalidHandshakeException Implements abstract org.
| |
| processFrame | back to summary |
|---|---|
| public void processFrame(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException Implements abstract org. Doc from org. Handle the frame specific to the draft
| |
| processFrameBinary | back to summary |
|---|---|
| private void processFrameBinary(WebSocketImpl webSocketImpl, Framedata frame) Process the frame if it is a binary frame
| |
| processFrameClosing | back to summary |
|---|---|
| private void processFrameClosing(WebSocketImpl webSocketImpl, Framedata frame) Process the frame if it is a closing frame
| |
| processFrameContinuousAndNonFin | back to summary |
|---|---|
| private void processFrameContinuousAndNonFin(WebSocketImpl webSocketImpl, Framedata frame, Opcode curop) throws InvalidDataException Process the frame if it is a continuous frame or the fin bit is not set
| |
| processFrameIsFin | back to summary |
|---|---|
| private void processFrameIsFin(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException Process the frame if it is the last frame
| |
| processFrameIsNotFin | back to summary |
|---|---|
| private void processFrameIsNotFin(Framedata frame) throws InvalidDataException Process the frame if it is not the last frame
| |
| processFrameText | back to summary |
|---|---|
| private void processFrameText(WebSocketImpl webSocketImpl, Framedata frame) throws InvalidDataException Process the frame if it is a text frame
| |
| reset | back to summary |
|---|---|
| public void reset() Implements abstract org.
| |
| toByteArray | back to summary |
|---|---|
| private byte[] toByteArray(long val, int bytecount) | |
| toOpcode | back to summary |
|---|---|
| private Opcode toOpcode(byte opcode) throws InvalidFrameException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| translateFrame | back to summary |
|---|---|
| public List Implements abstract org.
| |
| translateSingleFrame | back to summary |
|---|---|
| private Framedata translateSingleFrame(ByteBuffer buffer) throws IncompleteException, InvalidDataException | |
| translateSingleFrameCheckLengthLimit | back to summary |
|---|---|
| private void translateSingleFrameCheckLengthLimit(long length) throws LimitExceededException Check if the frame size exceeds the allowed limit
| |
| translateSingleFrameCheckPacketSize | back to summary |
|---|---|
| private void translateSingleFrameCheckPacketSize(int maxpacketsize, int realpacketsize) throws IncompleteException Check if the max packet size is smaller than the real packet size
| |
| translateSingleFramePayloadLength | back to summary |
|---|---|
| private Draft_6455. Translate the buffer depending when it has an extended payload length (126 or 127)
| |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private int |
| payloadLength | back to summary |
|---|---|
| private int payloadLength | |
| realPackageSize | back to summary |
|---|---|
| private int realPackageSize | |
| TranslatedPayloadMetaData | back to summary |
|---|---|
| pack-priv TranslatedPayloadMetaData(int newPayloadLength, int newRealPackageSize) | |
| getPayloadLength | back to summary |
|---|---|
| private int getPayloadLength() | |
| getRealPackageSize | back to summary |
|---|---|
| private int getRealPackageSize() | |