public abstract class SPIEndpoint
extends javax.net.websocket.Endpoint
| Constructor and Description |
|---|
SPIEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
checkHandshake(SPIHandshakeRequest hr)
This method must be called by the provider during
its check for a successful websocket handshake.
|
abstract 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.
|
abstract void |
onClose(javax.net.websocket.RemoteEndpoint gs)
Called by the provider when the web socket connection
to the given remote endpoint has just closed.
|
abstract void |
onConnect(javax.net.websocket.RemoteEndpoint gs)
Called by the provider when the web socket connection
is established.
|
abstract void |
onMessage(javax.net.websocket.RemoteEndpoint gs,
java.nio.ByteBuffer bytes)
Called by the provider when the web socket connection
has an incoming binary message from the given remote endpoint.
|
abstract void |
onMessage(javax.net.websocket.RemoteEndpoint 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 |
onOpen(javax.net.websocket.Session session) |
abstract void |
remove()
Called by the provider after all connections have been closed to
this endpoint, and after the endpoint has been removed from service.
|
public abstract boolean checkHandshake(SPIHandshakeRequest hr)
hr - SPIHandshakeRequest that is going to be checked.true if handshake is successful false otherwise.public abstract void onConnect(javax.net.websocket.RemoteEndpoint gs)
gs - SPIRemoteEndpoint who has just connected to this web socket endpoint.public abstract void onMessage(javax.net.websocket.RemoteEndpoint gs,
java.lang.String messageString)
gs - SPIRemoteEndpoint who sent the message.messageString - the String message.public abstract void onMessage(javax.net.websocket.RemoteEndpoint gs,
java.nio.ByteBuffer bytes)
gs - SPIRemoteEndpoint who sent the message.bytes - the message.public abstract void onClose(javax.net.websocket.RemoteEndpoint gs)
gs - SPIRemoteEndpoint who has just closed the connection.public abstract java.util.List<java.lang.String> getSupportedProtocols(java.util.List<java.lang.String> subProtocols)
subProtocols - the subprotocols to be checked.public abstract void remove()
public void onOpen(javax.net.websocket.Session session)
onOpen in class javax.net.websocket.EndpointCopyright © 2012. All Rights Reserved.