public class WebFiberConnection extends java.lang.Object implements WebSocketConnection
Constructor and Description |
---|
WebFiberConnection(org.jetlang.fibers.Fiber fiber,
WebSocketConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
add(org.jetlang.core.Disposable disposable) |
void |
close()
Attempts to close the underlying socket.
|
void |
dispose() |
void |
execute(java.lang.Runnable command) |
java.net.SocketAddress |
getRemoteAddress() |
HttpRequest |
getRequest() |
boolean |
remove(org.jetlang.core.Disposable disposable) |
org.jetlang.core.Disposable |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit) |
org.jetlang.core.Disposable |
scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit) |
org.jetlang.core.Disposable |
scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit) |
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
|
SendResult |
sendText(byte[] bytes,
int offset,
int length)
Non-Blocking send of a text message.
|
int |
size() |
public WebFiberConnection(org.jetlang.fibers.Fiber fiber, WebSocketConnection connection)
public HttpRequest getRequest()
getRequest
in interface WebSocketConnection
public java.net.SocketAddress getRemoteAddress()
getRemoteAddress
in interface WebSocketConnection
public SendResult send(java.lang.String msg)
WebSocketConnection
send
in interface WebSocketConnection
public SendResult sendText(byte[] bytes, int offset, int length)
WebSocketConnection
sendText
in interface WebSocketConnection
public SendResult sendPong(byte[] bytes, int offset, int length)
WebSocketConnection
sendPong
in interface WebSocketConnection
public SendResult sendPing(byte[] bytes, int offset, int length)
WebSocketConnection
sendPing
in interface WebSocketConnection
public SendResult sendBinary(byte[] buffer, int offset, int length)
WebSocketConnection
sendBinary
in interface WebSocketConnection
public void close()
WebSocketConnection
close
in interface WebSocketConnection
public void add(org.jetlang.core.Disposable disposable)
add
in interface org.jetlang.core.DisposingExecutor
public boolean remove(org.jetlang.core.Disposable disposable)
remove
in interface org.jetlang.core.DisposingExecutor
public int size()
size
in interface org.jetlang.core.DisposingExecutor
public void execute(java.lang.Runnable command)
execute
in interface java.util.concurrent.Executor
public org.jetlang.core.Disposable schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
schedule
in interface org.jetlang.core.Scheduler
public org.jetlang.core.Disposable scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
scheduleWithFixedDelay
in interface org.jetlang.core.Scheduler
public org.jetlang.core.Disposable scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
scheduleAtFixedRate
in interface org.jetlang.core.Scheduler
public void dispose()
dispose
in interface org.jetlang.core.Disposable
Copyright © 2019. All Rights Reserved.