Modifier and Type | Field and Description |
---|---|
Consumer<Response> |
async |
HttpClient |
httpClient |
boolean |
running |
SynchronousHandler |
synchronousHandler |
Constructor and Description |
---|
AsyncHandler(HttpClient httpClient) |
Modifier and Type | Method and Description |
---|---|
Consumer<Response> |
getAsync() |
boolean |
isRunning() |
Object |
onConnect(IoSession session)
连接成功事件
|
void |
onDisconnect(IoSession session)
连接断开事件
|
void |
onException(IoSession session,
Exception e)
异常事件
|
void |
onFlush(IoSession session)
Socket 缓冲区发送事件
|
void |
onIdle(IoSession session)
空闲事件
|
Object |
onReceive(IoSession session,
Object obj)
接收数据事件
|
void |
onSent(IoSession session,
Object obj)
发送数据事件
发送后调用
|
void |
setAsync(Consumer<Response> async) |
public HttpClient httpClient
public boolean running
public SynchronousHandler synchronousHandler
public AsyncHandler(HttpClient httpClient)
public boolean isRunning()
public Object onConnect(IoSession session)
IoHandler
public void onDisconnect(IoSession session)
IoHandler
onDisconnect
in interface IoHandler
session
- Session 对象public Object onReceive(IoSession session, Object obj)
IoHandler
public void onSent(IoSession session, Object obj)
IoHandler
public void onFlush(IoSession session)
IoHandler
public void onException(IoSession session, Exception e)
IoHandler
onException
in interface IoHandler
session
- Session 对象e
- 异常信息Copyright © 2020 Voovan. All rights reserved.