- java.lang.Object
-
- org.redkale.net.http.WebSocketWriteHandler
-
- 所有已实现的接口:
CompletionHandler<Integer,Void>
public class WebSocketWriteHandler extends Object implements CompletionHandler<Integer,Void>
- 作者:
- zhangjx
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static class
WebSocketWriteHandler.WebSocketFuture<T>
-
字段概要
字段 修饰符和类型 字段 说明 protected ObjectPool<ByteArray>
byteArrayPool
protected HttpContext
context
protected ConcurrentLinkedQueue<WebSocketWriteHandler.WebSocketFuture<Integer>>
requestQueue
protected List<WebSocketWriteHandler.WebSocketFuture<Integer>>
respList
protected WebSocket
webSocket
protected ByteArray
writeArray
protected AtomicBoolean
writePending
-
构造器概要
构造器 构造器 说明 WebSocketWriteHandler(HttpContext context, WebSocket webSocket, ObjectPool<ByteArray> byteArrayPool)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
completed(Integer result, Void attachment)
void
failed(Throwable exc, Void attachment)
CompletableFuture<Integer>
send(WebSocketPacket... packets)
protected void
writeEncode(ByteArray array, WebSocketPacket packet)
-
-
-
字段详细资料
-
context
protected final HttpContext context
-
webSocket
protected final WebSocket webSocket
-
writePending
protected final AtomicBoolean writePending
-
byteArrayPool
protected final ObjectPool<ByteArray> byteArrayPool
-
writeArray
protected final ByteArray writeArray
-
respList
protected final List<WebSocketWriteHandler.WebSocketFuture<Integer>> respList
-
requestQueue
protected final ConcurrentLinkedQueue<WebSocketWriteHandler.WebSocketFuture<Integer>> requestQueue
-
-
构造器详细资料
-
WebSocketWriteHandler
public WebSocketWriteHandler(HttpContext context, WebSocket webSocket, ObjectPool<ByteArray> byteArrayPool)
-
-
方法详细资料
-
send
public CompletableFuture<Integer> send(WebSocketPacket... packets)
-
completed
public void completed(Integer result, Void attachment)
- 指定者:
completed
在接口中CompletionHandler<Integer,Void>
-
failed
public void failed(Throwable exc, Void attachment)
- 指定者:
failed
在接口中CompletionHandler<Integer,Void>
-
writeEncode
protected void writeEncode(ByteArray array, WebSocketPacket packet)
-
-