public class WebSocketConnectionWrapper extends Object implements WebSocketConnection
| 限定符和类型 | 字段和说明 |
|---|---|
private WebSocketConnection |
connection |
| 构造器和说明 |
|---|
WebSocketConnectionWrapper(WebSocketConnection connection) |
| 限定符和类型 | 方法和说明 |
|---|---|
WebSocketConnectionWrapper |
close() |
Map<String,Object> |
data()
Arbitrary data that can be stored for the lifetime of the connection.
|
Object |
data(String key)
Retrieve data value by key.
|
WebSocketConnectionWrapper |
data(String key,
Object value)
Store data value by key.
|
Set<String> |
dataKeys()
List data keys.
|
void |
execute(Runnable command) |
Executor |
handlerExecutor() |
HttpRequest |
httpRequest() |
WebSocketConnection |
originalControl() |
WebSocketConnectionWrapper |
ping(byte[] msg)
Sends a ping frame
|
WebSocketConnectionWrapper |
pong(byte[] msg)
Sends a pong frame
|
WebSocketConnectionWrapper |
send(byte[] message)
Sends a binary frame
|
WebSocketConnectionWrapper |
send(byte[] message,
int offset,
int length)
Sends a binary frame
|
WebSocketConnectionWrapper |
send(String message)
Sends a text frame
|
WebSocketConnection |
underlyingControl() |
WebSocketConnectionWrapper |
underlyingControl(WebSocketConnection control) |
String |
version() |
private WebSocketConnection connection
public WebSocketConnectionWrapper(WebSocketConnection connection)
public WebSocketConnection underlyingControl()
public WebSocketConnectionWrapper underlyingControl(WebSocketConnection control)
public WebSocketConnection originalControl()
public HttpRequest httpRequest()
httpRequest 在接口中 HttpConnectionpublic WebSocketConnectionWrapper send(String message)
WebSocketConnectionsend 在接口中 WebSocketConnectionmessage - frame payloadpublic WebSocketConnectionWrapper send(byte[] message)
WebSocketConnectionsend 在接口中 WebSocketConnectionmessage - frame payloadpublic WebSocketConnectionWrapper ping(byte[] msg)
WebSocketConnectionping 在接口中 WebSocketConnectionmsg - the payload of the pingpublic WebSocketConnectionWrapper send(byte[] message, int offset, int length)
WebSocketConnectionsend 在接口中 WebSocketConnectionmessage - frame payloadoffset - The offset within the array of the first byte to be written; must be non-negative and no larger than message.lengthlength - The maximum number of bytes to be written to the given array; must be non-negative and no larger than message.length - offsetpublic WebSocketConnectionWrapper pong(byte[] msg)
WebSocketConnectionpong 在接口中 WebSocketConnectionmsg - the payload of the pingpublic WebSocketConnectionWrapper close()
close 在接口中 HttpConnectionclose 在接口中 WebSocketConnectionpublic Map<String,Object> data()
DataHolderdata 在接口中 DataHolderpublic Object data(String key)
DataHolderdata 在接口中 DataHolderDataHolder.data()public WebSocketConnectionWrapper data(String key, Object value)
DataHolderdata 在接口中 DataHolderdata 在接口中 WebSocketConnectionDataHolder.data()public Set<String> dataKeys()
DataHolderdataKeys 在接口中 DataHolderDataHolder.data()public Executor handlerExecutor()
handlerExecutor 在接口中 HttpConnectionpublic String version()
version 在接口中 WebSocketConnectionCopyright © 2014. All rights reserved.