|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.tyrus.platform.RemoteEndpointWrapper<T>
public final class RemoteEndpointWrapper<T>
Wrapps the RemoteEndpoint and represents the other side of the websocket connection.
| Method Summary | |
|---|---|
void |
close(javax.net.websocket.CloseReason cr)
|
java.lang.String |
getAddress()
URI to which the remote originally connected. |
static RemoteEndpointWrapper |
getRemoteWrapper(SPIRemoteEndpoint socket,
WebSocketEndpointImpl application,
boolean serverEndpoint)
Get the RemoteEndpoint wrapper. |
java.io.OutputStream |
getSendStream()
|
java.io.Writer |
getSendWriter()
|
javax.net.websocket.Session |
getSession()
|
boolean |
isConnected()
The endpoint is connected. |
void |
sendBytes(byte[] data)
|
java.util.concurrent.Future<javax.net.websocket.SendResult> |
sendBytes(byte[] data,
javax.net.websocket.SendHandler completion)
|
void |
sendObject(T o)
|
java.util.concurrent.Future<javax.net.websocket.SendResult> |
sendObject(T o,
javax.net.websocket.SendHandler handler)
|
void |
sendPartialBytes(byte[] partialByte,
boolean isLast)
|
void |
sendPartialString(java.lang.String fragment,
boolean isLast)
|
void |
sendPing(byte[] applicationData)
|
void |
sendPong(byte[] applicationData)
|
void |
sendString(java.lang.String data)
|
java.util.concurrent.Future<javax.net.websocket.SendResult> |
sendString(java.lang.String text,
javax.net.websocket.SendHandler completion)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static RemoteEndpointWrapper getRemoteWrapper(SPIRemoteEndpoint socket,
WebSocketEndpointImpl application,
boolean serverEndpoint)
socket - socket corresponding to the required wrapperapplication - web socket endpoint for which the wrapper represents the other side of the connectionserverEndpoint - server / client endpoint
public java.lang.String getAddress()
public boolean isConnected()
true iff the endpoint is connected, false otherwise.
public void sendString(java.lang.String data)
throws java.io.IOException
sendString in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
public void sendBytes(byte[] data)
throws java.io.IOException
sendBytes in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
public void sendPartialString(java.lang.String fragment,
boolean isLast)
throws java.io.IOException
sendPartialString in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
public void sendPartialBytes(byte[] partialByte,
boolean isLast)
throws java.io.IOException
sendPartialBytes in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
public java.io.OutputStream getSendStream()
throws java.io.IOException
getSendStream in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
public java.io.Writer getSendWriter()
throws java.io.IOException
getSendWriter in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
public void sendObject(T o)
throws java.io.IOException,
javax.net.websocket.EncodeException
sendObject in interface javax.net.websocket.RemoteEndpoint<T>java.io.IOException
javax.net.websocket.EncodeException
public java.util.concurrent.Future<javax.net.websocket.SendResult> sendString(java.lang.String text,
javax.net.websocket.SendHandler completion)
sendString in interface javax.net.websocket.RemoteEndpoint<T>
public java.util.concurrent.Future<javax.net.websocket.SendResult> sendBytes(byte[] data,
javax.net.websocket.SendHandler completion)
sendBytes in interface javax.net.websocket.RemoteEndpoint<T>
public java.util.concurrent.Future<javax.net.websocket.SendResult> sendObject(T o,
javax.net.websocket.SendHandler handler)
sendObject in interface javax.net.websocket.RemoteEndpoint<T>public void sendPing(byte[] applicationData)
sendPing in interface javax.net.websocket.RemoteEndpoint<T>public void sendPong(byte[] applicationData)
sendPong in interface javax.net.websocket.RemoteEndpoint<T>public java.lang.String toString()
toString in class java.lang.Object
public void close(javax.net.websocket.CloseReason cr)
throws java.io.IOException
java.io.IOExceptionpublic javax.net.websocket.Session getSession()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||