public abstract class MultiplexHttpDestination<C extends Connection> extends HttpDestination implements Promise<Connection>
AbstractLifeCycle.AbstractLifeCycleListener
Promise.Adapter<C>
Container.InheritedListener, Container.Listener
LifeCycle.Listener
LOG
Modifier | Constructor and Description |
---|---|
protected |
MultiplexHttpDestination(HttpClient client,
Origin origin) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
close(Connection connection) |
void |
failed(Throwable x)
Callback invoked when the operation fails.
|
int |
getMaxRequestsPerConnection() |
protected boolean |
process(C connection) |
void |
release(Connection connection) |
void |
send() |
protected abstract SendFailure |
send(C connection,
HttpExchange exchange) |
void |
setMaxRequestsPerConnection(int maxRequestsPerConnection) |
void |
succeeded(Connection result)
Callback invoked when the operation completes.
|
abort, asString, createConnection, dump, dump, enqueue, getClientConnectionFactory, getConnectAddress, getHost, getHostField, getHttpClient, getHttpExchanges, getOrigin, getPort, getProxy, getQueuedRequestCount, getRequestNotifier, getResponseNotifier, getScheme, newConnection, newExchangeQueue, newSslClientConnectionFactory, remove, send, toString
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, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
protected MultiplexHttpDestination(HttpClient client, Origin origin)
public int getMaxRequestsPerConnection()
public void setMaxRequestsPerConnection(int maxRequestsPerConnection)
public void send()
send
in class HttpDestination
public void succeeded(Connection result)
Promise
Callback invoked when the operation completes.
succeeded
in interface Promise<Connection>
result
- the contextPromise.failed(Throwable)
public void failed(Throwable x)
Promise
Callback invoked when the operation fails.
failed
in interface Promise<Connection>
x
- the reason for the operation failureprotected boolean process(C connection)
public void release(Connection connection)
release
in class HttpDestination
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class HttpDestination
public void close(Connection connection)
close
in class HttpDestination
protected abstract SendFailure send(C connection, HttpExchange exchange)
Copyright © 1995-2016 Webtide. All Rights Reserved.