public class WebSocketConnectionImpl extends java.lang.Object implements WebSocketConnection
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
empty |
static byte |
OPCODE_BINARY |
static byte |
OPCODE_CLOSE |
static byte |
OPCODE_CONT |
static byte |
OPCODE_PING |
static byte |
OPCODE_PONG |
static byte |
OPCODE_TEXT |
| Constructor and Description |
|---|
WebSocketConnectionImpl(NioWriter writer,
byte[] maskingBytes,
org.jetlang.fibers.NioFiber readFiber,
HttpRequest request) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.jetlang.core.Disposable disposable) |
void |
close()
Attempts to close the underlying socket.
|
void |
closeChannelOnReadThread() |
void |
dispose() |
void |
execute(java.lang.Runnable command) |
static org.jetlang.web.WebSocketConnectionImpl.SizeType |
findSize(int length) |
java.net.SocketAddress |
getRemoteAddress() |
HttpRequest |
getRequest() |
boolean |
remove(org.jetlang.core.Disposable disposable) |
org.jetlang.core.Disposable |
schedule(java.lang.Runnable runnable,
long l,
java.util.concurrent.TimeUnit timeUnit) |
org.jetlang.core.Disposable |
scheduleAtFixedRate(java.lang.Runnable runnable,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit timeUnit) |
org.jetlang.core.Disposable |
scheduleWithFixedDelay(java.lang.Runnable runnable,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit timeUnit) |
SendResult |
send(java.lang.String msg)
Non-Blocking send of a text message.
|
SendResult |
sendBinary(byte[] buffer,
int offset,
int length)
Non-Blocking send of a binary message.
|
SendResult |
sendPing(byte[] bytes,
int offset,
int length)
Non-Blocking send
|
SendResult |
sendPong(byte[] bytes,
int offset,
int length)
Non-Blocking send
|
int |
size() |
public static final byte OPCODE_CONT
public static final byte OPCODE_TEXT
public static final byte OPCODE_BINARY
public static final byte OPCODE_CLOSE
public static final byte OPCODE_PING
public static final byte OPCODE_PONG
public static final byte[] empty
public WebSocketConnectionImpl(NioWriter writer, byte[] maskingBytes, org.jetlang.fibers.NioFiber readFiber, HttpRequest request)
public HttpRequest getRequest()
getRequest in interface WebSocketConnectionpublic java.net.SocketAddress getRemoteAddress()
getRemoteAddress in interface WebSocketConnectionpublic SendResult send(java.lang.String msg)
WebSocketConnectionsend in interface WebSocketConnectionpublic SendResult sendPong(byte[] bytes, int offset, int length)
WebSocketConnectionsendPong in interface WebSocketConnectionpublic SendResult sendPing(byte[] bytes, int offset, int length)
WebSocketConnectionsendPing in interface WebSocketConnectionpublic SendResult sendBinary(byte[] buffer, int offset, int length)
WebSocketConnectionsendBinary in interface WebSocketConnectionpublic static org.jetlang.web.WebSocketConnectionImpl.SizeType findSize(int length)
public void closeChannelOnReadThread()
public void close()
WebSocketConnectionclose in interface WebSocketConnectionpublic org.jetlang.core.Disposable schedule(java.lang.Runnable runnable,
long l,
java.util.concurrent.TimeUnit timeUnit)
schedule in interface org.jetlang.core.Schedulerpublic org.jetlang.core.Disposable scheduleWithFixedDelay(java.lang.Runnable runnable,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit timeUnit)
scheduleWithFixedDelay in interface org.jetlang.core.Schedulerpublic org.jetlang.core.Disposable scheduleAtFixedRate(java.lang.Runnable runnable,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit timeUnit)
scheduleAtFixedRate in interface org.jetlang.core.Schedulerpublic void add(org.jetlang.core.Disposable disposable)
add in interface org.jetlang.core.DisposingExecutorpublic boolean remove(org.jetlang.core.Disposable disposable)
remove in interface org.jetlang.core.DisposingExecutorpublic int size()
size in interface org.jetlang.core.DisposingExecutorpublic void execute(java.lang.Runnable command)
execute in interface java.util.concurrent.Executorpublic void dispose()
dispose in interface org.jetlang.core.DisposableCopyright © 2018. All Rights Reserved.