public class IotHttp2Client
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CONNECTION_COUNT_UNLIMITED |
| Constructor and Description |
|---|
IotHttp2Client(Profile profile,
int maxConnectionCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(ConnectionListener listener) |
java.util.List<Connection> |
allConnections() |
Http2Headers |
authHeader()
generate header with authorization parameters
|
Connection |
newConnection()
create new connection to server
|
Connection |
randomConnection()
TODO support
|
void |
removeConnectionListener(ConnectionListener listener) |
void |
sendRequest(Connection connection,
Http2Request request,
Http2StreamListener listener,
CompletableListener<StreamWriteContext> completableListener)
send Request interface
|
void |
shutdown() |
public static final int CONNECTION_COUNT_UNLIMITED
public IotHttp2Client(Profile profile, int maxConnectionCount)
public Connection newConnection()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
java.util.concurrent.ExecutionException - executionExceptionjava.lang.InterruptedException - interruptedExceptionpublic Http2Headers authHeader()
public void shutdown()
public void addConnectionListener(ConnectionListener listener)
public void removeConnectionListener(ConnectionListener listener)
public java.util.List<Connection> allConnections()
public void sendRequest(Connection connection,
Http2Request request,
Http2StreamListener listener,
CompletableListener<StreamWriteContext> completableListener)
connection - request - H2 请求listener - 下行数据监听请求completableListener - 请求发送是否成功的回调public Connection randomConnection()