@Contract(threading=SAFE) public abstract class AsyncConnectionEndpoint extends Object implements ModalCloseable
Constructor and Description |
---|
AsyncConnectionEndpoint() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this stream and releases any system resources associated with it.
|
abstract void |
execute(String id,
AsyncClientExchangeHandler exchangeHandler,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
HttpContext context)
Initiates a message exchange using the given handler.
|
void |
execute(String id,
AsyncClientExchangeHandler exchangeHandler,
HttpContext context)
Initiates a message exchange using the given handler.
|
<T> Future<T> |
execute(String id,
AsyncRequestProducer requestProducer,
AsyncResponseConsumer<T> responseConsumer,
FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(String id,
AsyncRequestProducer requestProducer,
AsyncResponseConsumer<T> responseConsumer,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(String id,
AsyncRequestProducer requestProducer,
AsyncResponseConsumer<T> responseConsumer,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
HttpContext context,
FutureCallback<T> callback)
Initiates message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(String id,
AsyncRequestProducer requestProducer,
AsyncResponseConsumer<T> responseConsumer,
HttpContext context,
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(Timeout timeout)
Sets socket timeout.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public final void close() throws IOException
Closeable
close
in interface Closeable
close
in interface AutoCloseable
IOException
- if an I/O error occurspublic abstract void execute(String id, AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
id
- unique operation ID or null
.exchangeHandler
- the message exchange handler.pushHandlerFactory
- the push handler factory.context
- the execution context.public void execute(String id, AsyncClientExchangeHandler exchangeHandler, 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, AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, 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.public final <T> Future<T> execute(String id, AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, 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, AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, 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, AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HttpContext context, 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 abstract boolean isConnected()
public abstract void setSocketTimeout(Timeout timeout)
timeout
- the socket timeout.