@Contract(threading=SAFE) public abstract class AsyncConnectionEndpoint extends Object implements org.apache.hc.core5.io.ModalCloseable
Constructor and Description |
---|
AsyncConnectionEndpoint() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
abstract void |
execute(String id,
org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler,
org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory,
org.apache.hc.core5.http.protocol.HttpContext context)
Initiates a message exchange using the given handler.
|
void |
execute(String id,
org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler,
org.apache.hc.core5.http.protocol.HttpContext context)
Initiates a message exchange using the given handler.
|
<T> Future<T> |
execute(String id,
org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
org.apache.hc.core5.concurrent.FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(String id,
org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory,
org.apache.hc.core5.concurrent.FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(String id,
org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory,
org.apache.hc.core5.http.protocol.HttpContext context,
org.apache.hc.core5.concurrent.FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(String id,
org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer,
org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer,
org.apache.hc.core5.http.protocol.HttpContext context,
org.apache.hc.core5.concurrent.FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
abstract boolean |
isConnected()
Determines if the connection to the remote endpoint is still open and valid.
|
abstract void |
setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
Sets socket timeout.
|
public abstract void execute(String id, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context)
id
- unique operation ID or null
.exchangeHandler
- the message exchange handler.pushHandlerFactory
- the push handler factory.context
- the execution context.public abstract boolean isConnected()
public abstract void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
timeout
- the socket timeout.public final void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void execute(String id, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler exchangeHandler, org.apache.hc.core5.http.protocol.HttpContext context)
id
- unique operation ID or null
.exchangeHandler
- the message exchange handler.context
- the execution context.public final <T> Future<T> execute(String id, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
T
- the result representation.id
- unique operation ID or null
.requestProducer
- the request producer.responseConsumer
- the response consumer.pushHandlerFactory
- the push handler factory.context
- the execution context.callback
- the result callback.public final <T> Future<T> execute(String id, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.protocol.HttpContext context, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
T
- the result representation.id
- unique operation ID or null
.requestProducer
- the request producer.responseConsumer
- the response consumer.context
- the execution context.callback
- the result callback.public final <T> Future<T> execute(String id, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncPushConsumer> pushHandlerFactory, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
T
- the result representation.id
- unique operation ID or null
.requestProducer
- the request producer.responseConsumer
- the response consumer.pushHandlerFactory
- the push handler factory.callback
- the result callback.public final <T> Future<T> execute(String id, org.apache.hc.core5.http.nio.AsyncRequestProducer requestProducer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<T> responseConsumer, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
T
- the result representation.id
- unique operation ID or null
.requestProducer
- the request producer.responseConsumer
- the response consumer.callback
- the result callback.Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.