public interface WebSocketListener
WebSocket instances.| Modifier and Type | Method and Description |
|---|---|
void |
onClose(WebSocket socket,
ClosingFrame frame)
Invoked when
WebSocket.onClose(org.glassfish.tyrus.websockets.draft06.ClosingFrame) has been called on a
particular WebSocket instance. |
void |
onConnect(WebSocket socket)
Invoked when the opening handshake has been completed for a specific
WebSocket instance. |
void |
onFragment(WebSocket socket,
byte[] fragment,
boolean last)
Invoked when
WebSocket.onFragment(boolean, byte[]) has been called
on a particular WebSocket instance. |
void |
onFragment(WebSocket socket,
String fragment,
boolean last)
Invoked when
WebSocket.onFragment(boolean, String) has been called
on a particular WebSocket instance. |
void |
onMessage(WebSocket socket,
byte[] bytes)
Invoked when
WebSocket.onMessage(String) has been called on a
particular WebSocket instance. |
void |
onMessage(WebSocket socket,
String text)
Invoked when
WebSocket.onMessage(String) has been called on a
particular WebSocket instance. |
void |
onPing(WebSocket socket,
byte[] bytes)
Invoked when
WebSocket.onPing(DataFrame) has been called on a
particular WebSocket instance. |
void |
onPong(WebSocket socket,
byte[] bytes)
Invoked when
WebSocket.onPong(DataFrame) has been called on a
particular WebSocket instance. |
void onClose(WebSocket socket, ClosingFrame frame)
WebSocket.onClose(org.glassfish.tyrus.websockets.draft06.ClosingFrame) has been called on a
particular WebSocket instance.
void onConnect(WebSocket socket)
Invoked when the opening handshake has been completed for a specific
WebSocket instance.
socket - the newly connected WebSocketvoid onMessage(WebSocket socket, String text)
Invoked when WebSocket.onMessage(String) has been called on a
particular WebSocket instance.
socket - the WebSocket that received a message.text - the message received.void onMessage(WebSocket socket, byte[] bytes)
Invoked when WebSocket.onMessage(String) has been called on a
particular WebSocket instance.
socket - the WebSocket that received a message.bytes - the message received.void onPing(WebSocket socket, byte[] bytes)
Invoked when WebSocket.onPing(DataFrame) has been called on a
particular WebSocket instance.
socket - the WebSocket that received the ping.bytes - the payload of the ping frame, if any.void onPong(WebSocket socket, byte[] bytes)
Invoked when WebSocket.onPong(DataFrame) has been called on a
particular WebSocket instance.
socket - the WebSocket that received the pong.bytes - the payload of the pong frame, if any.void onFragment(WebSocket socket, String fragment, boolean last)
Invoked when WebSocket.onFragment(boolean, String) has been called
on a particular WebSocket instance.
socket - the WebSocket received the message fragment.fragment - the message fragment.last - flag indicating if this was the last fragment.void onFragment(WebSocket socket, byte[] fragment, boolean last)
Invoked when WebSocket.onFragment(boolean, byte[]) has been called
on a particular WebSocket instance.
socket - the WebSocket received the message fragment.fragment - the message fragment.last - flag indicating if this was the last fragment.Copyright © 2012-2013. All Rights Reserved.