|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.websocket.AbstractWebSocketListener
public abstract class AbstractWebSocketListener
Application handler for a WebSocket tcp stream
The read stream should only be read by the onRead
thread.
The write stream must be synchronized if it's every written by a thread
other than the serviceRead
Constructor Summary | |
---|---|
AbstractWebSocketListener()
|
Method Summary | |
---|---|
void |
onClose(WebSocketContext context)
Called when the peer closes the connection gracefully. |
void |
onDisconnect(WebSocketContext context)
Called when the connection terminates. |
void |
onReadBinary(WebSocketContext context,
java.io.InputStream is)
Called when a binary message is available |
void |
onReadText(WebSocketContext context,
java.io.Reader is)
Called when a text message is available |
void |
onStart(WebSocketContext context)
Called when the connection is established |
void |
onTimeout(WebSocketContext context)
Called when the connection times out |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractWebSocketListener()
Method Detail |
---|
public void onStart(WebSocketContext context) throws java.io.IOException
onStart
in interface WebSocketListener
java.io.IOException
public void onReadBinary(WebSocketContext context, java.io.InputStream is) throws java.io.IOException
onReadBinary
in interface WebSocketListener
java.io.IOException
public void onReadText(WebSocketContext context, java.io.Reader is) throws java.io.IOException
onReadText
in interface WebSocketListener
java.io.IOException
public void onClose(WebSocketContext context) throws java.io.IOException
onClose
in interface WebSocketListener
java.io.IOException
public void onDisconnect(WebSocketContext context) throws java.io.IOException
onDisconnect
in interface WebSocketListener
java.io.IOException
public void onTimeout(WebSocketContext context) throws java.io.IOException
onTimeout
in interface WebSocketListener
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |