| Modifier and Type | Class and Description |
|---|---|
| protected static enum |
| Modifier and Type | Field and Description |
|---|---|
| protected Broadcaster | |
| protected final EnumSet | |
| protected final Queue | |
| private static final Logger | |
| protected final ProtocolHandler | |
| protected final AtomicReference |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | add(WebSocketListener listener)
Implements org. Adds a |
| public void | broadcast(Iterable<? extends WebSocket> recipients, String data)
Implements org. Broadcasts the data to the remote end-point set. |
| public void | broadcast(Iterable<? extends WebSocket> recipients, byte[] data)
Implements org. Broadcasts the data to the remote end-point set. |
| public void | broadcastFragment(Iterable<? extends WebSocket> recipients, String data, boolean last)
Implements org. Broadcasts the data fragment to the remote end-point set. |
| public void | broadcastFragment(Iterable<? extends WebSocket> recipients, byte[] data, boolean last)
Implements org. Broadcasts the data fragment to the remote end-point set. |
| public void | |
| public void | close(int code)
Implements org.
Closes this |
| public void | close(int code, String reason)
Implements org.
Closes this |
| protected Broadcaster | |
| public Collection | |
| public boolean | isConnected()
Implements org.
Convenience method to determine if this |
| public void | onClose(final DataFrame frame)
Implements org. This callback will be invoked when the remote end-point sent a closing frame. |
| public void | onConnect()
Implements org. This callback will be invoked when the opening handshake between both endpoints has been completed. |
| public void | onFragment(boolean last, byte[] fragment)
Implements org. This callback will be invoked when a fragmented binary message has been received. |
| public void | onFragment(boolean last, String fragment)
Implements org. This callback will be invoked when a fragmented textual message has been received. |
| public void | onMessage(byte[] data)
Implements org. This callback will be invoked when a binary message has been received. |
| public void | onMessage(String text)
Implements org. This callback will be invoked when a text message has been received. |
| public void | onPing(DataFrame frame)
Implements org. This callback will be invoked when the remote end-point has sent a ping frame. |
| public void | onPong(DataFrame frame)
Implements org. This callback will be invoked when the remote end-point has sent a pong frame. |
| public final boolean | remove(WebSocketListener listener)
Implements org. Removes the specified |
| public GrizzlyFuture | send(byte[] data)
Implements org. Send a binary frame to the remote end-point. |
| public GrizzlyFuture | send(String data)
Implements org. Send a text frame to the remote end-point. |
| private GrizzlyFuture | |
| public GrizzlyFuture | sendPing(byte[] data)
Implements org. Sends a |
| public GrizzlyFuture | sendPong(byte[] data)
Implements org.
Sends a |
| protected void | |
| protected void | |
| public void | |
| public GrizzlyFuture | stream(boolean last, String fragment)
Implements org. Sends a fragment of a complete message. |
| public GrizzlyFuture | stream(boolean last, byte[] bytes, int off, int len)
Implements org. Sends a fragment of a complete message. |
| protected byte[] | |
| protected byte[] | |
| protected byte[] | |
| protected byte[] |
| broadcaster | back to summary |
|---|---|
| protected Broadcaster broadcaster | |
| connected | back to summary |
|---|---|
| protected final EnumSet<SimpleWebSocket. | |
| listeners | back to summary |
|---|---|
| protected final Queue<WebSocketListener> listeners | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| protocolHandler | back to summary |
|---|---|
| protected final ProtocolHandler protocolHandler | |
| state | back to summary |
|---|---|
| protected final AtomicReference<SimpleWebSocket. | |
| SimpleWebSocket | back to summary |
|---|---|
| public SimpleWebSocket(final ProtocolHandler protocolHandler, final WebSocketListener... listeners) | |
| add | back to summary |
|---|---|
| public final boolean add(WebSocketListener listener) Implements org. Doc from org. Adds a
| |
| broadcast | back to summary |
|---|---|
| public void broadcast(Iterable<? extends WebSocket> recipients, String data) Implements org. Doc from org. Broadcasts the data to the remote end-point set.
| |
| broadcast | back to summary |
|---|---|
| public void broadcast(Iterable<? extends WebSocket> recipients, byte[] data) Implements org. Doc from org. Broadcasts the data to the remote end-point set.
| |
| broadcastFragment | back to summary |
|---|---|
| public void broadcastFragment(Iterable<? extends WebSocket> recipients, String data, boolean last) Implements org. Doc from org. Broadcasts the data fragment to the remote end-point set.
| |
| broadcastFragment | back to summary |
|---|---|
| public void broadcastFragment(Iterable<? extends WebSocket> recipients, byte[] data, boolean last) Implements org. Doc from org. Broadcasts the data fragment to the remote end-point set.
| |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org.
Closes this
| |
| close | back to summary |
|---|---|
| public void close(int code) Implements org. Doc from org.
Closes this
| |
| close | back to summary |
|---|---|
| public void close(int code, String reason) Implements org. Doc from org.
Closes this
| |
| getBroadcaster | back to summary |
|---|---|
| protected Broadcaster getBroadcaster() | |
| getListeners | back to summary |
|---|---|
| public Collection | |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Implements org. Doc from org.
Convenience method to determine if this
| |
| onClose | back to summary |
|---|---|
| public void onClose(final DataFrame frame) Implements org. Doc from org. This callback will be invoked when the remote end-point sent a closing frame.
| |
| onConnect | back to summary |
|---|---|
| public void onConnect() Implements org. Doc from org. This callback will be invoked when the opening handshake between both endpoints has been completed.
| |
| onFragment | back to summary |
|---|---|
| public void onFragment(boolean last, byte[] fragment) Implements org. Doc from org. This callback will be invoked when a fragmented binary message has been received.
| |
| onFragment | back to summary |
|---|---|
| public void onFragment(boolean last, String fragment) Implements org. Doc from org. This callback will be invoked when a fragmented textual message has been received.
| |
| onMessage | back to summary |
|---|---|
| public void onMessage(byte[] data) Implements org. Doc from org. This callback will be invoked when a binary message has been received.
| |
| onMessage | back to summary |
|---|---|
| public void onMessage(String text) Implements org. Doc from org. This callback will be invoked when a text message has been received.
| |
| onPing | back to summary |
|---|---|
| public void onPing(DataFrame frame) Implements org. Doc from org. This callback will be invoked when the remote end-point has sent a ping frame.
| |
| onPong | back to summary |
|---|---|
| public void onPong(DataFrame frame) Implements org. Doc from org. This callback will be invoked when the remote end-point has sent a pong frame.
| |
| remove | back to summary |
|---|---|
| public final boolean remove(WebSocketListener listener) Implements org. Doc from org. Removes the specified
| |
| send | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org. Send a binary frame to the remote end-point.
| |
| send | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org. Send a text frame to the remote end-point.
| |
| send | back to summary |
|---|---|
| private GrizzlyFuture | |
| sendPing | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org. Sends a
| |
| sendPong | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org.
Sends a It may seem odd to send a pong frame, however, RFC-6455 states: "A Pong frame MAY be sent unsolicited. This serves as a unidirectional heartbeat. A response to an unsolicited Pong frame is not expected."
| |
| sendRaw | back to summary |
|---|---|
protected void sendRaw(byte[] rawData)
| |
| setBroadcaster | back to summary |
|---|---|
| protected void setBroadcaster(Broadcaster broadcaster) | |
| setClosed | back to summary |
|---|---|
| public void setClosed() | |
| stream | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org. Sends a fragment of a complete message.
| |
| stream | back to summary |
|---|---|
| public GrizzlyFuture Implements org. Doc from org. Sends a fragment of a complete message.
| |
| toRawData | back to summary |
|---|---|
| protected byte[] toRawData(String text) | |
| toRawData | back to summary |
|---|---|
| protected byte[] toRawData(byte[] binary) | |
| toRawData | back to summary |
|---|---|
| protected byte[] toRawData(String fragment, boolean last) | |
| toRawData | back to summary |
|---|---|
| protected byte[] toRawData(byte[] binary, boolean last) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final SimpleWebSocket. | |
| public static final SimpleWebSocket. | |
| public static final SimpleWebSocket. | |
| public static final SimpleWebSocket. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SimpleWebSocket. | |
| public static SimpleWebSocket. |
| CLOSED | back to summary |
|---|---|
| public static final SimpleWebSocket. | |
| CLOSING | back to summary |
|---|---|
| public static final SimpleWebSocket. | |
| CONNECTED | back to summary |
|---|---|
| public static final SimpleWebSocket. | |
| NEW | back to summary |
|---|---|
| public static final SimpleWebSocket. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static SimpleWebSocket. | |
| values | back to summary |
|---|---|
| public static SimpleWebSocket. | |