@Contract(threading=SAFE) public abstract class AsyncClientEndpoint extends Object
Once the endpoint is no longer needed it MUST be released with releaseAndReuse()
or releaseAndDiscard()
.
Constructor and Description |
---|
AsyncClientEndpoint() |
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(AsyncClientExchangeHandler exchangeHandler,
HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
HttpContext context)
Initiates a message exchange using the given handler.
|
void |
execute(AsyncClientExchangeHandler exchangeHandler,
HttpContext context)
Initiates a message exchange using the given handler.
|
<T> Future<T> |
execute(AsyncRequestProducer requestProducer,
AsyncResponseConsumer<T> responseConsumer,
FutureCallback<T> callback)
Initiates a message exchange using the given request producer and response consumer.
|
<T> Future<T> |
execute(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(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 |
releaseAndDiscard()
Shuts down the underlying connection and removes it from the connection pool.
|
abstract void |
releaseAndReuse()
Releases the underlying connection back to the connection pool as re-usable.
|
public abstract void execute(AsyncClientExchangeHandler exchangeHandler, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context)
Once the endpoint is no longer needed it MUST be released with releaseAndReuse()
or releaseAndDiscard()
.
public void execute(AsyncClientExchangeHandler exchangeHandler, HttpContext context)
Once the endpoint is no longer needed it MUST be released with releaseAndReuse()
or releaseAndDiscard()
.
public abstract void releaseAndReuse()
public abstract void releaseAndDiscard()
public abstract boolean isConnected()
public final <T> Future<T> execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HandlerFactory<AsyncPushConsumer> pushHandlerFactory, HttpContext context, FutureCallback<T> callback)
Once the endpoint is no longer needed it MUST be released with releaseAndReuse()
or releaseAndDiscard()
.
public final <T> Future<T> execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, HttpContext context, FutureCallback<T> callback)
Once the endpoint is no longer needed it MUST be released with releaseAndReuse()
or releaseAndDiscard()
.
public final <T> Future<T> execute(AsyncRequestProducer requestProducer, AsyncResponseConsumer<T> responseConsumer, FutureCallback<T> callback)
Once the endpoint is no longer needed it MUST be released with releaseAndReuse()
or releaseAndDiscard()
.
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.