|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.tyrus.grizzly.GrizzlyRemoteEndpoint
public class GrizzlyRemoteEndpoint
| Constructor Summary | |
|---|---|
GrizzlyRemoteEndpoint(org.glassfish.grizzly.websockets.WebSocket socket)
|
|
| Method Summary | |
|---|---|
static GrizzlyRemoteEndpoint |
get(org.glassfish.grizzly.websockets.WebSocket socket)
|
OutputStream |
getSendStream()
Opens an output stream on which a binary message may be sent. |
Writer |
getSendWriter()
Opens an character stream on which a text message may be sent. |
static void |
remove(org.glassfish.grizzly.websockets.WebSocket socket)
|
void |
sendBytes(ByteBuffer byteBuffer)
Send a binary message, returning when all of the message has been transmitted. |
void |
sendBytesByCompletion(ByteBuffer byteBuffer,
SendHandler sendHandler)
Initiates the asynchronous transmission of a binary message. |
Future<SendResult> |
sendBytesByFuture(ByteBuffer byteBuffer)
Initiates the asynchronous transmission of a binary message. |
void |
sendObject(Object o)
Sends a custom developer object, blocking until it has been transmitted. |
void |
sendObjectByCompletion(Object o,
SendHandler sendHandler)
Initiates the asynchronous transmission of a custom developer object. |
Future<SendResult> |
sendObjectByFuture(Object o)
Initiates the asynchronous transmission of a custom developer object. |
void |
sendPartialBytes(ByteBuffer byteBuffer,
boolean b)
Send a binary message in pieces, blocking until all of the message has been transmitted. |
void |
sendPartialString(String fragment,
boolean isLast)
Send a text message in pieces, blocking until all of the message has been transmitted. |
void |
sendPing(ByteBuffer byteBuffer)
Send a Ping message containing the given application data to the remote endpoint. |
void |
sendPong(ByteBuffer byteBuffer)
Allows the developer to send an unsolicited Pong message containing the given application data in order to serve as a unidirectional heartbeat for the session. |
void |
sendString(String text)
Send a text message, blocking until all of the message has been transmitted. |
void |
sendStringByCompletion(String s,
SendHandler sendHandler)
Initiates the asynchronous transmission of a text message. |
Future<SendResult> |
sendStringByFuture(String s)
Initiates the asynchronous transmission of a text message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrizzlyRemoteEndpoint(org.glassfish.grizzly.websockets.WebSocket socket)
| Method Detail |
|---|
public static GrizzlyRemoteEndpoint get(org.glassfish.grizzly.websockets.WebSocket socket)
public static void remove(org.glassfish.grizzly.websockets.WebSocket socket)
public void sendString(String text)
throws IOException
RemoteEndpoint
sendString in interface RemoteEndpointtext - the message to be sent.
IOException
public void sendBytes(ByteBuffer byteBuffer)
throws IOException
RemoteEndpoint
sendBytes in interface RemoteEndpointbyteBuffer - the message to be sent.
IOException
public void sendPartialString(String fragment,
boolean isLast)
throws IOException
RemoteEndpoint
sendPartialString in interface RemoteEndpointfragment - the piece of the message being sent.isLast - Whether the fragment being sent is the last piece of the message.
IOException
public void sendPartialBytes(ByteBuffer byteBuffer,
boolean b)
throws IOException
RemoteEndpoint
sendPartialBytes in interface RemoteEndpointbyteBuffer - the piece of the message being sent.b - Whether the fragment being sent is the last piece of the message.
IOException
public OutputStream getSendStream()
throws IOException
RemoteEndpoint
getSendStream in interface RemoteEndpointIOException
public Writer getSendWriter()
throws IOException
RemoteEndpoint
getSendWriter in interface RemoteEndpointIOException
public void sendObject(Object o)
throws IOException,
EncodeException
RemoteEndpoint
sendObject in interface RemoteEndpointo - the object to be sent.
IOException
EncodeException
public void sendStringByCompletion(String s,
SendHandler sendHandler)
RemoteEndpoint
sendStringByCompletion in interface RemoteEndpoints - the text being sent.sendHandler - the handler which will be notified of progress.public Future<SendResult> sendStringByFuture(String s)
RemoteEndpoint
sendStringByFuture in interface RemoteEndpoints - the text being sent.
public Future<SendResult> sendBytesByFuture(ByteBuffer byteBuffer)
RemoteEndpoint
sendBytesByFuture in interface RemoteEndpointbyteBuffer - the data being sent.
public void sendBytesByCompletion(ByteBuffer byteBuffer,
SendHandler sendHandler)
RemoteEndpoint
sendBytesByCompletion in interface RemoteEndpointbyteBuffer - the data being sent.sendHandler - the handler that will be notified of progress.public Future<SendResult> sendObjectByFuture(Object o)
RemoteEndpoint
sendObjectByFuture in interface RemoteEndpointo - the object being sent.
public void sendObjectByCompletion(Object o,
SendHandler sendHandler)
RemoteEndpoint
sendObjectByCompletion in interface RemoteEndpointo - the object being sent.sendHandler - the handler that will be notified of progresspublic void sendPing(ByteBuffer byteBuffer)
RemoteEndpoint
sendPing in interface RemoteEndpointbyteBuffer - the data to be carried in the ping request.public void sendPong(ByteBuffer byteBuffer)
RemoteEndpoint
sendPong in interface RemoteEndpointbyteBuffer - the application data to be carried in the pong response.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||