|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SPIEndpoint
The WebSocket SDK implements SPIEndpoint with its representation of a websocket endpoint mapped to a base URI that wishes to handle incoming messages.
| Method Summary | |
|---|---|
boolean |
checkHandshake(SPIHandshakeRequest hr)
This method must be called by the provider during its check for a successful websocket handshake. |
java.util.List<java.lang.String> |
getSupportedProtocols(java.util.List<java.lang.String> subProtocols)
Called by the provider during the handshake to determine a list of subprotocols this endpoint will support of those passed in. |
void |
onClose(SPIRemoteEndpoint gs)
Called by the provider when the web socket connection to the given remote endpoint has just closed. |
void |
onConnect(SPIRemoteEndpoint gs)
Called by the provider when the web socket connection is established. |
void |
onMessage(SPIRemoteEndpoint gs,
byte[] messageBytes)
Called by the provider when the web socket connection has an incoming binary message from the given remote endpoint. |
void |
onMessage(SPIRemoteEndpoint gs,
java.lang.String messageString)
Called by the provider when the web socket connection has an incoming text message from the given remote endpoint. |
void |
remove()
Called by the provider after all connections have been closed to this endpoint, and after the endpoint has been removed from service. |
| Method Detail |
|---|
boolean checkHandshake(SPIHandshakeRequest hr)
hr - SPIHandshakeRequest that is going to be checked.
true if handshake is successful false otherwise.void onConnect(SPIRemoteEndpoint gs)
gs - SPIRemoteEndpoint who has just connected to this web socket endpoint.
void onMessage(SPIRemoteEndpoint gs,
java.lang.String messageString)
gs - SPIRemoteEndpoint who sent the message.messageString - the String message.
void onMessage(SPIRemoteEndpoint gs,
byte[] messageBytes)
gs - SPIRemoteEndpoint who sent the message.messageBytes - the byte[] message.void onClose(SPIRemoteEndpoint gs)
gs - SPIRemoteEndpoint who has just closed the connection.java.util.List<java.lang.String> getSupportedProtocols(java.util.List<java.lang.String> subProtocols)
subProtocols - the subprotocols to be checked.
void remove()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||