public class WebSocketHixie76 extends Object implements WebSocketProtocolIfc
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
WS_PROTOCOL_KEY, WS_VERSION_KEY| Constructor and Description |
|---|
WebSocketHixie76() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection(WebSocketXMPPIOService service)
Method closes connection by sending close frame
|
ByteBuffer |
decodeFrame(WebSocketXMPPIOService service,
ByteBuffer buf)
Method responsible for decoding data received from socket and returning
data after extracting it from WebSocket frame.
|
void |
encodeFrameAndWrite(WebSocketXMPPIOService service,
ByteBuffer buf)
Method encodes data into WebSocket frame and writes it to passed service
|
String |
getId()
Method to retrieve string identifier of implementation of protcol version
|
boolean |
handshake(WebSocketXMPPIOService service,
Map<String,String> headers,
byte[] buf)
Method responsible for handshaking of WebSocket using proper version of
protocol.
|
public static final String ID
public String getId()
WebSocketProtocolIfcgetId in interface WebSocketProtocolIfcpublic boolean handshake(WebSocketXMPPIOService service, Map<String,String> headers, byte[] buf) throws NoSuchAlgorithmException, IOException
WebSocketProtocolIfchandshake in interface WebSocketProtocolIfcNoSuchAlgorithmExceptionIOExceptionpublic ByteBuffer decodeFrame(WebSocketXMPPIOService service, ByteBuffer buf)
WebSocketProtocolIfcdecodeFrame in interface WebSocketProtocolIfcpublic void encodeFrameAndWrite(WebSocketXMPPIOService service, ByteBuffer buf) throws IOException
WebSocketProtocolIfcencodeFrameAndWrite in interface WebSocketProtocolIfcIOExceptionpublic void closeConnection(WebSocketXMPPIOService service)
WebSocketProtocolIfccloseConnection in interface WebSocketProtocolIfcCopyright © 2016 "Tigase, Inc.". All rights reserved.