public class TyrusRemoteEndpoint extends SPIRemoteEndpoint
SPIRemoteEndpoint implementation.| Constructor and Description |
|---|
TyrusRemoteEndpoint(WebSocket socket)
Create remote endpoint.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(javax.websocket.CloseReason closeReason) |
static TyrusRemoteEndpoint |
get(WebSocket socket)
Get
TyrusRemoteEndpoint instance. |
static void |
remove(WebSocket socket)
Remove socket.
|
void |
sendBytes(ByteBuffer byteBuffer) |
void |
sendPartialBytes(ByteBuffer byteBuffer,
boolean b) |
void |
sendPartialString(String fragment,
boolean isLast) |
void |
sendPing(ByteBuffer byteBuffer) |
void |
sendPong(ByteBuffer byteBuffer) |
void |
sendString(String text) |
public TyrusRemoteEndpoint(WebSocket socket)
socket - to be used for sending messages.public static TyrusRemoteEndpoint get(WebSocket socket)
TyrusRemoteEndpoint instance. Used on server side for managing multiple connected clients.socket - WebSocket instance used for lookup.TyrusRemoteEndpoint.public static void remove(WebSocket socket)
socket - socket instance to be removed.public void sendString(String text) throws IOException
sendString in class SPIRemoteEndpointIOExceptionpublic void sendBytes(ByteBuffer byteBuffer) throws IOException
sendBytes in class SPIRemoteEndpointIOExceptionpublic void sendPartialString(String fragment, boolean isLast) throws IOException
sendPartialString in class SPIRemoteEndpointIOExceptionpublic void sendPartialBytes(ByteBuffer byteBuffer, boolean b) throws IOException
sendPartialBytes in class SPIRemoteEndpointIOExceptionpublic void sendPing(ByteBuffer byteBuffer)
sendPing in class SPIRemoteEndpointpublic void sendPong(ByteBuffer byteBuffer)
sendPong in class SPIRemoteEndpointpublic void close(javax.websocket.CloseReason closeReason)
close in class SPIRemoteEndpointCopyright © 2012-2013. All Rights Reserved.