@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 connection) |
protected void |
doStart() |
protected void |
doStop() |
void |
dump(Appendable out,
String indent) |
void |
failed(Throwable x) |
DuplexConnectionPool |
getConnectionPool() |
protected DuplexConnectionPool |
newConnectionPool(HttpClient client) |
boolean |
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 SendFailure |
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, 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 void doStart()
throws Exception
doStart in class ContainerLifeCycleExceptionprotected void doStop()
throws Exception
doStop in class ContainerLifeCycleExceptionprotected DuplexConnectionPool newConnectionPool(HttpClient client)
@ManagedAttribute(value="The connection pool", readonly=true) public DuplexConnectionPool getConnectionPool()
public void send()
send in class HttpDestinationpublic C acquire()
public boolean 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 SendFailure send(C connection, HttpExchange exchange)
public void release(Connection c)
release in class HttpDestinationpublic void close(Connection connection)
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-2016 Webtide. All Rights Reserved.