org.glassfish.tyrus.grizzly
Class GrizzlyRemoteEndpoint

java.lang.Object
  extended by org.glassfish.tyrus.grizzly.GrizzlyRemoteEndpoint
All Implemented Interfaces:
javax.net.websocket.RemoteEndpoint

public class GrizzlyRemoteEndpoint
extends Object
implements javax.net.websocket.RemoteEndpoint

Author:
Danny Coward (danny.coward at oracle.com)

Constructor Summary
GrizzlyRemoteEndpoint(org.glassfish.grizzly.websockets.WebSocket socket)
           
 
Method Summary
static GrizzlyRemoteEndpoint get(org.glassfish.grizzly.websockets.WebSocket socket)
           
 OutputStream getSendStream()
           
 Writer getSendWriter()
           
 String getUri()
           
 boolean isConnected()
           
static void remove(org.glassfish.grizzly.websockets.WebSocket socket)
           
 void sendBytes(ByteBuffer byteBuffer)
           
 Future<javax.net.websocket.SendResult> sendBytes(ByteBuffer byteBuffer, javax.net.websocket.SendHandler sendHandler)
           
 void sendObject(Object o)
           
 Future<javax.net.websocket.SendResult> sendObject(Object o, javax.net.websocket.SendHandler handler)
           
 void sendPartialBytes(ByteBuffer byteBuffer, boolean b)
           
 void sendPartialString(String fragment, boolean isLast)
           
 void sendPing(ByteBuffer byteBuffer)
           
 void sendPong(ByteBuffer byteBuffer)
           
 void sendString(String text)
           
 Future<javax.net.websocket.SendResult> sendString(String text, javax.net.websocket.SendHandler completion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrizzlyRemoteEndpoint

public GrizzlyRemoteEndpoint(org.glassfish.grizzly.websockets.WebSocket socket)
Method Detail

get

public static GrizzlyRemoteEndpoint get(org.glassfish.grizzly.websockets.WebSocket socket)

remove

public static void remove(org.glassfish.grizzly.websockets.WebSocket socket)

isConnected

public boolean isConnected()

getUri

public String getUri()

sendString

public void sendString(String text)
                throws IOException
Specified by:
sendString in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException

sendBytes

public void sendBytes(ByteBuffer byteBuffer)
               throws IOException
Specified by:
sendBytes in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException

sendPartialString

public void sendPartialString(String fragment,
                              boolean isLast)
                       throws IOException
Specified by:
sendPartialString in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException

sendPartialBytes

public void sendPartialBytes(ByteBuffer byteBuffer,
                             boolean b)
                      throws IOException
Specified by:
sendPartialBytes in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException

getSendStream

public OutputStream getSendStream()
                           throws IOException
Specified by:
getSendStream in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException

getSendWriter

public Writer getSendWriter()
                     throws IOException
Specified by:
getSendWriter in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException

sendObject

public void sendObject(Object o)
                throws IOException,
                       javax.net.websocket.EncodeException
Specified by:
sendObject in interface javax.net.websocket.RemoteEndpoint
Throws:
IOException
javax.net.websocket.EncodeException

sendString

public Future<javax.net.websocket.SendResult> sendString(String text,
                                                         javax.net.websocket.SendHandler completion)
Specified by:
sendString in interface javax.net.websocket.RemoteEndpoint

sendBytes

public Future<javax.net.websocket.SendResult> sendBytes(ByteBuffer byteBuffer,
                                                        javax.net.websocket.SendHandler sendHandler)
Specified by:
sendBytes in interface javax.net.websocket.RemoteEndpoint

sendObject

public Future<javax.net.websocket.SendResult> sendObject(Object o,
                                                         javax.net.websocket.SendHandler handler)
Specified by:
sendObject in interface javax.net.websocket.RemoteEndpoint

sendPing

public void sendPing(ByteBuffer byteBuffer)
Specified by:
sendPing in interface javax.net.websocket.RemoteEndpoint

sendPong

public void sendPong(ByteBuffer byteBuffer)
Specified by:
sendPong in interface javax.net.websocket.RemoteEndpoint


Copyright © 2012. All Rights Reserved.