@ManagedObject public abstract class HttpDestination extends ContainerLifeCycle implements Destination, Closeable, Dumpable
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Constructor and Description |
|---|
HttpDestination(HttpClient client,
Origin origin) |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopprotected static final Logger LOG
public HttpDestination(HttpClient client, Origin origin)
protected Queue<HttpExchange> newExchangeQueue(HttpClient client)
protected ClientConnectionFactory newSslClientConnectionFactory(ClientConnectionFactory connectionFactory)
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()
protected void send(HttpRequest request, List<Response.ResponseListener> listeners)
protected boolean enqueue(Queue<HttpExchange> queue, HttpExchange exchange)
public abstract void send()
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, Connectionprotected void createConnection(Promise<Connection> promise)
public boolean remove(HttpExchange exchange)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void release(Connection connection)
public void close(Connection connection)
public void abort(Throwable cause)
HttpExchanges queued in this destination.cause - the abort causepublic String dump()
dump in interface Dumpabledump in class ContainerLifeCyclepublic void dump(Appendable out, String indent) throws IOException
dump in interface Dumpabledump in class ContainerLifeCycleIOExceptionpublic String asString()
Copyright © 1995-2015 Webtide. All Rights Reserved.