|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.websocket.DefaultWebSocketListener
public class DefaultWebSocketListener
Default WebSocketListener implementation. Most methods are no-ops. This allows for quick override customization without clutter of methods that the developer isn't interested in dealing with.
| Field Summary | |
|---|---|
protected WebSocket |
webSocket
|
| Constructor Summary | |
|---|---|
DefaultWebSocketListener()
|
|
| Method Summary | |
|---|---|
void |
onClose(WebSocket websocket)
Invoked when the WebSocket is close. |
void |
onError(Throwable t)
Invoked when the WebSocket is open. |
void |
onFragment(byte[] fragment,
boolean last)
Invoked when bytes of a fragmented message are available. |
void |
onFragment(String fragment,
boolean last)
Invoked when WebSocket text fragments are received. |
void |
onMessage(byte[] message)
Invoked when bytes are available. |
void |
onMessage(String message)
Invoked when WebSocket text message are received. |
void |
onOpen(WebSocket websocket)
Invoked when the WebSocket is open. |
void |
onPing(byte[] message)
Invoked when a ping message is received |
void |
onPong(byte[] message)
Invoked when a pong message is received |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected WebSocket webSocket
| Constructor Detail |
|---|
public DefaultWebSocketListener()
| Method Detail |
|---|
public void onMessage(byte[] message)
onMessage in interface WebSocketByteListenermessage - a byte array.
public void onFragment(byte[] fragment,
boolean last)
onFragment in interface WebSocketByteListenerfragment - byte[] fragment.last - if this fragment is the last in the series.public void onPing(byte[] message)
onPing in interface WebSocketPingListenermessage - a byte arraypublic void onPong(byte[] message)
onPong in interface WebSocketPongListenermessage - a byte arraypublic void onMessage(String message)
onMessage in interface WebSocketTextListenermessage - a String message
public void onFragment(String fragment,
boolean last)
onFragment in interface WebSocketTextListenerfragment - text fragmentlast - if this fragment is the last of the series.public void onOpen(WebSocket websocket)
WebSocket is open.
onOpen in interface WebSocketListenerpublic void onClose(WebSocket websocket)
WebSocket is close.
onClose in interface WebSocketListenerpublic void onError(Throwable t)
WebSocket is open.
onError in interface WebSocketListenert - a Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||