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 |
sendBinary(ByteBuffer byteBuffer) |
void |
sendBinary(ByteBuffer byteBuffer,
boolean b) |
void |
sendPing(ByteBuffer byteBuffer) |
void |
sendPong(ByteBuffer byteBuffer) |
void |
sendText(String text) |
void |
sendText(String fragment,
boolean isLast) |
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 sendText(String text) throws IOException
sendText in class SPIRemoteEndpointIOExceptionpublic void sendBinary(ByteBuffer byteBuffer) throws IOException
sendBinary in class SPIRemoteEndpointIOExceptionpublic void sendText(String fragment, boolean isLast) throws IOException
sendText in class SPIRemoteEndpointIOExceptionpublic void sendBinary(ByteBuffer byteBuffer, boolean b) throws IOException
sendBinary 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.