|
||||||||||
| 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. |
String |
getUri()
|
boolean |
isConnected()
|
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. |
Future<SendResult> |
sendBytes(ByteBuffer byteBuffer,
SendHandler sendHandler)
Initiates the asynchronous transmission of a binary message. |
void |
sendObject(Object o)
Sends a custom developer object, blocking until it has been transmitted. |
Future<SendResult> |
sendObject(Object o,
SendHandler handler)
Initiates the 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. |
Future<SendResult> |
sendString(String text,
SendHandler completion)
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 boolean isConnected()
public String getUri()
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.
IOException
public void sendPartialBytes(ByteBuffer byteBuffer,
boolean b)
throws IOException
RemoteEndpoint
sendPartialBytes in interface RemoteEndpointbyteBuffer - the piece of the message being sent.
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 Future<SendResult> sendString(String text,
SendHandler completion)
RemoteEndpoint
sendString in interface RemoteEndpointtext - the text being sent.completion - the handler which will be notified of progress.
public Future<SendResult> sendBytes(ByteBuffer byteBuffer,
SendHandler sendHandler)
RemoteEndpoint
sendBytes in interface RemoteEndpointbyteBuffer - the data being sent.sendHandler - the handler that will be notified of progress.
public Future<SendResult> sendObject(Object o,
SendHandler handler)
RemoteEndpoint
sendObject in interface RemoteEndpointo - the object being sent.
public 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 | |||||||||