public class WebSocketEventDriver extends Object implements IncomingFrames
Supports WebSocket instances that either implement WebSocketListener
or have used the @WebSocket
annotation.
There will be an instance of the WebSocketEventDriver per connection.
Constructor and Description |
---|
WebSocketEventDriver(Object websocket,
EventMethodsCache methodsCache,
WebSocketPolicy policy,
ByteBufferPool bufferPool)
Establish the driver for the Websocket POJO
|
Modifier and Type | Method and Description |
---|---|
WebSocketPolicy |
getPolicy() |
Object |
getWebSocketObject()
Get the Websocket POJO in use
|
void |
incoming(WebSocketException e) |
void |
incoming(WebSocketFrame frame)
Internal entry point for incoming frames
|
void |
onConnect()
Internal entry point for connection established
|
void |
setSession(WebSocketSession conn)
Set the connection to use for this driver
|
String |
toString() |
public WebSocketEventDriver(Object websocket, EventMethodsCache methodsCache, WebSocketPolicy policy, ByteBufferPool bufferPool)
websocket
- public WebSocketPolicy getPolicy()
public Object getWebSocketObject()
public void incoming(WebSocketException e)
incoming
in interface IncomingFrames
public void incoming(WebSocketFrame frame)
incoming
in interface IncomingFrames
frame
- the frame that appearedpublic void onConnect()
public void setSession(WebSocketSession conn)
conn
- the connectionCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.