@ManagedObject public abstract class HttpDestination extends ContainerLifeCycle implements Destination, Closeable, Callback, Dumpable
AbstractLifeCycle.AbstractLifeCycleListenerCallback.Completable, Callback.Completing, Callback.InvocableCallback, Callback.NestedInvocable.InvocationTypeContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING__nonBlocking| Constructor and Description |
|---|
HttpDestination(HttpClient client,
Origin origin) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Throwable cause)
Aborts all the
HttpExchanges queued in this destination. |
String |
asString() |
void |
close() |
void |
close(Connection connection) |
void |
dump(Appendable out,
String indent)
Dump this object (and children) into an Appendable using the provided indent after any new lines.
|
void |
failed(Throwable x)
Callback invoked when the operation fails.
|
ClientConnectionFactory |
getClientConnectionFactory() |
Origin.Address |
getConnectAddress() |
ConnectionPool |
getConnectionPool() |
String |
getHost() |
HttpField |
getHostField() |
HttpClient |
getHttpClient() |
Queue<HttpExchange> |
getHttpExchanges() |
Origin |
getOrigin() |
int |
getPort() |
ProxyConfiguration.Proxy |
getProxy() |
int |
getQueuedRequestCount() |
RequestNotifier |
getRequestNotifier() |
ResponseNotifier |
getResponseNotifier() |
String |
getScheme() |
boolean |
isSecure() |
void |
newConnection(Promise<Connection> promise)
Creates asynchronously a new, unpooled,
Connection that will be returned
at a later time through the given Promise. |
boolean |
process(Connection connection) |
void |
release(Connection connection) |
boolean |
remove(Connection connection) |
boolean |
remove(HttpExchange exchange) |
void |
send() |
void |
send(HttpExchange exchange) |
void |
succeeded()
Callback invoked when the operation completes.
|
String |
toString() |
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcombine, from, from, from, from, from, fromcombine, getInvocationType, getInvocationType, invokeNonBlocking, isNonBlockingInvocationdump, dump, dumpContainer, dumpIterable, dumpMapEntries, dumpObject, dumpObjects, dumpSelf, namedpublic HttpDestination(HttpClient client, Origin origin)
public boolean isSecure()
public HttpClient getHttpClient()
public Origin getOrigin()
public Queue<HttpExchange> getHttpExchanges()
public RequestNotifier getRequestNotifier()
public ResponseNotifier getResponseNotifier()
public ProxyConfiguration.Proxy getProxy()
public ClientConnectionFactory getClientConnectionFactory()
@ManagedAttribute(value="The destination scheme", readonly=true) public String getScheme()
getScheme in interface Destination@ManagedAttribute(value="The destination host", readonly=true) public String getHost()
getHost in interface Destination@ManagedAttribute(value="The destination port", readonly=true) public int getPort()
getPort in interface Destination@ManagedAttribute(value="The number of queued requests", readonly=true) public int getQueuedRequestCount()
public Origin.Address getConnectAddress()
public HttpField getHostField()
@ManagedAttribute(value="The connection pool", readonly=true) public ConnectionPool getConnectionPool()
public void succeeded()
CallbackCallback invoked when the operation completes.
succeeded in interface CallbackCallback.failed(Throwable)public void failed(Throwable x)
CallbackCallback invoked when the operation fails.
public void send(HttpExchange exchange)
public void send()
public boolean process(Connection connection)
public void newConnection(Promise<Connection> promise)
DestinationConnection that will be returned
at a later time through the given Promise.
Use FuturePromise to wait for the connection:
Destination destination = ...; FuturePromise<Connection> futureConnection = new FuturePromise<>(); destination.newConnection(futureConnection); Connection connection = futureConnection.get(5, TimeUnit.SECONDS);
newConnection in interface Destinationpromise - the promise of a new, unpooled, Connectionpublic boolean remove(HttpExchange exchange)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void release(Connection connection)
public boolean remove(Connection connection)
public void close(Connection connection)
public void abort(Throwable cause)
HttpExchanges queued in this destination.cause - the abort causepublic void dump(Appendable out, String indent) throws IOException
Dumpabledump in interface Dumpabledump in class ContainerLifeCycleout - The appendable to dump toindent - The indent to apply after any new lines.IOException - if unable to write to Appendablepublic String asString()
public String toString()
toString in class AbstractLifeCycleCopyright © 2010 - 2020 Adobe. All Rights Reserved