Destination, Callback, Container, Destroyable, Dumpable, LifeCycleHttpDestinationOverHTTP@ManagedObject public abstract class PoolingHttpDestination<C extends Connection> extends HttpDestination implements Callback
AbstractLifeCycle.AbstractLifeCycleListenerCallback.Adapter, Callback.Nested, Callback.NonBlockingContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPINGLOG| Constructor | Description |
|---|---|
PoolingHttpDestination(HttpClient client,
Origin origin) |
| Modifier and Type | Method | Description |
|---|---|---|
C |
acquire() |
|
void |
close() |
|
void |
close(Connection connection) |
|
protected void |
doStart() |
|
protected void |
doStop() |
|
void |
failed(java.lang.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() |
|
java.lang.String |
toString() |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopisNonBlockingaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansabort, asString, createConnection, dump, enqueue, getClientConnectionFactory, getConnectAddress, getHost, getHostField, getHttpClient, getHttpExchanges, getOrigin, getPort, getProxy, getQueuedRequestCount, getRequestNotifier, getResponseNotifier, getScheme, newConnection, newExchangeQueue, newSslClientConnectionFactory, remove, sendpublic PoolingHttpDestination(HttpClient client, Origin origin)
protected void doStart()
throws java.lang.Exception
doStart in class ContainerLifeCyclejava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
doStop in class ContainerLifeCyclejava.lang.Exceptionprotected 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 class HttpDestinationpublic java.lang.String toString()
toString in class HttpDestinationCopyright © 1995–2017 Webtide. All rights reserved.