public class IotHttp2Client extends 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) |
List<Connection> |
allConnections() |
io.netty.handler.codec.http2.Http2Headers |
authHeader()
generate header with authorization parameters
|
Connection |
newConnection()
create new connection to server
|
Optional<Connection> |
randomConnection(Predicate<Connection> predicate) |
void |
removeConnectionListener(ConnectionListener listener) |
CompletableFuture<Http2Response> |
sendRequest(Connection connection,
io.netty.handler.codec.http2.Http2Headers headers,
byte[] data) |
void |
sendRequest(Connection connection,
io.netty.handler.codec.http2.Http2Headers headers,
byte[] data,
Http2StreamListener listener) |
void |
shutdown() |
public static final int CONNECTION_COUNT_UNLIMITED
public IotHttp2Client(Profile profile, int maxConnectionCount)
public Connection newConnection() throws ExecutionException, InterruptedException
ExecutionException - executionExceptionInterruptedException - interruptedExceptionpublic io.netty.handler.codec.http2.Http2Headers authHeader()
public void shutdown()
public void addConnectionListener(ConnectionListener listener)
public void removeConnectionListener(ConnectionListener listener)
public List<Connection> allConnections()
public void sendRequest(Connection connection, io.netty.handler.codec.http2.Http2Headers headers, byte[] data, Http2StreamListener listener)
public CompletableFuture<Http2Response> sendRequest(Connection connection, io.netty.handler.codec.http2.Http2Headers headers, byte[] data)
public Optional<Connection> randomConnection(Predicate<Connection> predicate)
Copyright © 2019. All rights reserved.