|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SPIRemoteEndpoint
This interface represents the unique object which represents the other end of the web socket connection (i.e. the remote client) to the SDK. So the provider must supply one of these for each web socket connection. There must be precisely one instance of this type per connection. The provider must not manufacture a new instance of this type per incoming message, for example.
| Method Summary | |
|---|---|
void |
close(int code,
java.lang.String reason)
Close the underlying connection using the web socket defined codes. |
java.lang.String |
getUri()
Returns the URI http request as a String. |
boolean |
isConnected()
Return true iff the connection is active. |
void |
send(byte[] data)
Send the given data, throwing the IOException if the message is not sent. |
void |
send(java.lang.String data)
Send the given string, throwing the IOException if the message is not sent. |
| Method Detail |
|---|
boolean isConnected()
true if connected, false otherwise.
void send(java.lang.String data)
throws java.io.IOException
data - String that is going to be sent.
java.io.IOException
void send(byte[] data)
throws java.io.IOException
data - byte[] that is going to be sent.
java.io.IOException
void close(int code,
java.lang.String reason)
throws java.io.IOException
code - the closing code defined in the web socket protocol.reason - for closing.
java.io.IOExceptionjava.lang.String getUri()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||