|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.tyrus.spi.SPIEndpoint
public abstract class SPIEndpoint
The WebSocket SDK implements SPIEndpoint with its representation of a websocket endpoint mapped to a base URI that wishes to handle incoming messages.
| Constructor Summary | |
|---|---|
SPIEndpoint()
|
|
| Method Summary | |
|---|---|
abstract boolean |
checkHandshake(SPIHandshakeRequest hr)
This method must be called by the provider during its check for a successful websocket handshake. |
abstract List<String> |
getNegotiatedExtensions(List<String> clientExtensions)
Get the negotiated extensions' names based on the extensions supported by client. |
abstract String |
getNegotiatedProtocol(List<String> clientProtocols)
Compute the sub - protocol which will be used. |
abstract void |
onClose(RemoteEndpoint gs)
Called by the provider when the web socket connection to the given remote endpoint has just closed. |
abstract void |
onConnect(RemoteEndpoint gs,
String subprotocol,
List<String> extensions)
Called by the provider when the web socket connection is established. |
abstract void |
onMessage(RemoteEndpoint gs,
ByteBuffer bytes)
Called by the provider when the web socket connection has an incoming binary message from the given remote endpoint. |
abstract void |
onMessage(RemoteEndpoint gs,
String messageString)
Called by the provider when the web socket connection has an incoming text message from the given remote endpoint. |
abstract void |
onPartialMessage(RemoteEndpoint gs,
ByteBuffer partialBytes,
boolean last)
Called by the provider when the web socket connection has an incoming partial binary message from the given remote endpoint. |
abstract void |
onPartialMessage(RemoteEndpoint gs,
String partialString,
boolean last)
Called by the provider when the web socket connection has an incoming partial text message from the given remote endpoint. |
abstract void |
onPing(RemoteEndpoint gs,
ByteBuffer bytes)
Called by the provider when the web socket connection has an incoming ping message from the given remote endpoint. |
abstract void |
onPong(RemoteEndpoint gs,
ByteBuffer bytes)
Called by the provider when the web socket connection has an incoming pong message from the given remote endpoint. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SPIEndpoint()
| Method Detail |
|---|
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(RemoteEndpoint gs,
String subprotocol,
List<String> extensions)
gs - SPIRemoteEndpoint who has just connected to this web socket endpoint.
public abstract void onMessage(RemoteEndpoint gs,
String messageString)
gs - SPIRemoteEndpoint who sent the message.messageString - the String message.
public abstract void onPartialMessage(RemoteEndpoint gs,
String partialString,
boolean last)
gs - SPIRemoteEndpoint who sent the message.partialString - the String message.last - to indicate if this is the last partial string in the sequence
public abstract void onPartialMessage(RemoteEndpoint gs,
ByteBuffer partialBytes,
boolean last)
gs - SPIRemoteEndpoint who sent the message.partialBytes - the piece of the binary message.last - to indicate if this is the last partial byte buffer in the sequence
public abstract void onMessage(RemoteEndpoint gs,
ByteBuffer bytes)
gs - SPIRemoteEndpoint who sent the message.bytes - the message.
public abstract void onPong(RemoteEndpoint gs,
ByteBuffer bytes)
gs - SPIRemoteEndpoint who sent the message.bytes - the message.
public abstract void onPing(RemoteEndpoint gs,
ByteBuffer bytes)
gs - SPIRemoteEndpoint who sent the message.bytes - the message.public abstract void onClose(RemoteEndpoint gs)
gs - SPIRemoteEndpoint who has just closed the connection.public abstract void remove()
public abstract List<String> getNegotiatedExtensions(List<String> clientExtensions)
clientExtensions - names of the extensions' supported by client.
public abstract String getNegotiatedProtocol(List<String> clientProtocols)
clientProtocols - sub - protocols supported by client.
null if none found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||