public abstract class WebSocketAdapter extends java.lang.Object implements WebSocketListener
| 构造器和说明 |
|---|
WebSocketAdapter() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getFlashPolicy(WebSocket conn)
Gets the XML string that should be returned if a client requests a Flash
security policy.
|
void |
onWebsocketHandshakeReceivedAsClient(WebSocket conn,
ClientHandshake request,
ServerHandshake response) |
ServerHandshakeBuilder |
onWebsocketHandshakeReceivedAsServer(WebSocket conn,
Draft draft,
ClientHandshake request)
This default implementation does not do anything.
|
void |
onWebsocketHandshakeSentAsClient(WebSocket conn,
ClientHandshake request)
This default implementation does not do anything which will cause the connections to always progress.
|
void |
onWebsocketMessageFragment(WebSocket conn,
Framedata frame)
This default implementation does not do anything.
|
void |
onWebsocketPing(WebSocket conn,
Framedata f)
This default implementation will send a pong in response to the received ping.
|
void |
onWebsocketPong(WebSocket conn,
Framedata f)
This default implementation does not do anything.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalSocketAddress, getRemoteSocketAddress, onWebsocketClose, onWebsocketCloseInitiated, onWebsocketClosing, onWebsocketError, onWebsocketMessage, onWebsocketMessage, onWebsocketOpen, onWriteDemandpublic ServerHandshakeBuilder onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft, ClientHandshake request) throws InvalidDataException
public void onWebsocketHandshakeReceivedAsClient(WebSocket conn, ClientHandshake request, ServerHandshake response) throws InvalidDataException
public void onWebsocketHandshakeSentAsClient(WebSocket conn, ClientHandshake request) throws InvalidDataException
public void onWebsocketMessageFragment(WebSocket conn, Framedata frame)
public void onWebsocketPing(WebSocket conn, Framedata f)
public void onWebsocketPong(WebSocket conn, Framedata f)
public java.lang.String getFlashPolicy(WebSocket conn) throws InvalidDataException
getFlashPolicy 在接口中 WebSocketListenerInvalidDataException - thrown when some data that is required to generate the flash-policy like the websocket local port could not be obtained e.g because the websocket is not connected.