@ManagedObject public abstract class PoolingHttpDestination<C extends Connection> extends HttpDestination implements Callback
AbstractLifeCycle.AbstractLifeCycleListenerCallback.Adapter, Callback.NonBlockingContainer.InheritedListener, Container.ListenerLifeCycle.ListenerLOG| Constructor and Description |
|---|
PoolingHttpDestination(HttpClient client,
Origin origin) |
| Modifier and Type | Method and Description |
|---|---|
C |
acquire() |
void |
close() |
void |
close(Connection oldConnection) |
void |
dump(Appendable out,
String indent) |
void |
failed(Throwable x) |
ConnectionPool |
getConnectionPool() |
protected ConnectionPool |
newConnectionPool(HttpClient client) |
void |
process(C connection)
Processes a new connection making it idle or active depending on whether requests are waiting to be sent.
|
void |
release(Connection c) |
void |
send() |
protected abstract void |
send(C connection,
HttpExchange exchange) |
void |
succeeded() |
String |
toString() |
abort, asString, createConnection, dump, enqueue, getClientConnectionFactory, getConnectAddress, getHost, getHostField, getHttpClient, getHttpExchanges, getOrigin, getPort, getProxy, getQueuedRequestCount, getRequestNotifier, getResponseNotifier, getScheme, newConnection, newExchangeQueue, newSslClientConnectionFactory, remove, sendaddBean, 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, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisNonBlockingpublic PoolingHttpDestination(HttpClient client, Origin origin)
protected ConnectionPool newConnectionPool(HttpClient client)
@ManagedAttribute(value="The connection pool", readonly=true) public ConnectionPool getConnectionPool()
public void send()
send in class HttpDestinationpublic C acquire()
public void process(C connection)
Processes a new connection making it idle or active depending on whether requests are waiting to be sent.
A new connection is created when a request needs to be executed; it is possible that the request that triggered the request creation is executed by another connection that was just released, so the new connection may become idle.
If a request is waiting to be executed, it will be dequeued and executed by the new connection.
connection - the new connectionprotected abstract void send(C connection, HttpExchange exchange)
public void release(Connection c)
release in class HttpDestinationpublic void close(Connection oldConnection)
close in class HttpDestinationpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class HttpDestinationpublic void dump(Appendable out, String indent) throws IOException
dump in interface Dumpabledump in class HttpDestinationIOExceptionpublic String toString()
toString in class HttpDestinationCopyright © 1995-2015 Webtide. All Rights Reserved.