Package org.eclipse.net4j.ws.jetty
Class Net4jWebSocket
- java.lang.Object
- 
- org.eclipse.net4j.ws.jetty.Net4jWebSocket
 
- 
- All Implemented Interfaces:
- org.eclipse.jetty.websocket.api.WebSocketConnectionListener,- org.eclipse.jetty.websocket.api.WebSocketListener
 
 public class Net4jWebSocket extends java.lang.Object implements org.eclipse.jetty.websocket.api.WebSocketListener- Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description static shortCONTROL_CHANNEL_IDstatic byteOPCODE_DEREGISTRATIONstatic byteOPCODE_NEGOTIATIONstatic byteOPCODE_REGISTRATIONstatic byteOPCODE_REGISTRATION_ACK
 - 
Constructor SummaryConstructors Constructor Description Net4jWebSocket()Called byNet4jWebSocketServlet.Net4jWebSocket(IWSConnector connector)Called byWSClientConnector.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidderegisterChannel(short channelID)IWSConnectorgetConnector()org.eclipse.jetty.websocket.api.SessiongetSession()booleanisClient()voidonWebSocketBinary(byte[] payload, int offset, int len)voidonWebSocketClose(int statusCode, java.lang.String reason)voidonWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)voidonWebSocketError(java.lang.Throwable cause)voidonWebSocketText(java.lang.String message)voidregisterChannel(short channelID, long timeout, IProtocol<?> protocol)voidsendBuffer(IBuffer buffer)
 
- 
- 
- 
Field Detail- 
CONTROL_CHANNEL_IDpublic static final short CONTROL_CHANNEL_ID - See Also:
- Constant Field Values
 
 - 
OPCODE_NEGOTIATIONpublic static final byte OPCODE_NEGOTIATION - See Also:
- Constant Field Values
 
 - 
OPCODE_REGISTRATIONpublic static final byte OPCODE_REGISTRATION - See Also:
- Constant Field Values
 
 - 
OPCODE_REGISTRATION_ACKpublic static final byte OPCODE_REGISTRATION_ACK - See Also:
- Constant Field Values
 
 - 
OPCODE_DEREGISTRATIONpublic static final byte OPCODE_DEREGISTRATION - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
Net4jWebSocketpublic Net4jWebSocket() Called byNet4jWebSocketServlet.
 - 
Net4jWebSocketpublic Net4jWebSocket(IWSConnector connector) Called byWSClientConnector.
 
- 
 - 
Method Detail- 
getConnectorpublic IWSConnector getConnector() 
 - 
getSessionpublic org.eclipse.jetty.websocket.api.Session getSession() - Since:
- 1.1
 
 - 
isClientpublic boolean isClient() 
 - 
onWebSocketConnectpublic void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session) - Specified by:
- onWebSocketConnectin interface- org.eclipse.jetty.websocket.api.WebSocketConnectionListener
 
 - 
closepublic void close() 
 - 
onWebSocketClosepublic void onWebSocketClose(int statusCode, java.lang.String reason)- Specified by:
- onWebSocketClosein interface- org.eclipse.jetty.websocket.api.WebSocketConnectionListener
 
 - 
registerChannelpublic void registerChannel(short channelID, long timeout, IProtocol<?> protocol) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
deregisterChannelpublic void deregisterChannel(short channelID) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
sendBufferpublic void sendBuffer(IBuffer buffer) 
 - 
onWebSocketBinarypublic void onWebSocketBinary(byte[] payload, int offset, int len)- Specified by:
- onWebSocketBinaryin interface- org.eclipse.jetty.websocket.api.WebSocketListener
 
 - 
onWebSocketTextpublic void onWebSocketText(java.lang.String message) - Specified by:
- onWebSocketTextin interface- org.eclipse.jetty.websocket.api.WebSocketListener
 
 - 
onWebSocketErrorpublic void onWebSocketError(java.lang.Throwable cause) - Specified by:
- onWebSocketErrorin interface- org.eclipse.jetty.websocket.api.WebSocketConnectionListener
 
 
- 
 
-