public class IotHttp2Client
extends java.lang.Object
| 限定符和类型 | 字段和说明 | 
|---|---|
static int | 
CONNECTION_COUNT_UNLIMITED  | 
| 构造器和说明 | 
|---|
IotHttp2Client(Profile profile,
              int maxConnectionCount)  | 
| 限定符和类型 | 方法和说明 | 
|---|---|
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()