public abstract class AbstractHttpClientTransport extends ContainerLifeCycle implements HttpClientTransport
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractHttpClientTransport.ClientSelectorManager |
AbstractLifeCycle.AbstractLifeCycleListenerClientConnectionFactory.HelperContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOG |
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGHTTP_CONNECTION_PROMISE_CONTEXT_KEY, HTTP_DESTINATION_CONTEXT_KEY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpClientTransport(int selectors) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(HttpClient client,
SocketChannel channel) |
void |
connect(SocketAddress address,
Map<String,Object> context)
Establishes a physical connection to the given
address. |
protected void |
connectFailed(Map<String,Object> context,
Throwable x) |
protected void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
protected HttpClient |
getHttpClient() |
protected SelectorManager |
newSelectorManager(HttpClient client) |
void |
setHttpClient(HttpClient client)
Sets the
HttpClient instance on this transport. |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewHttpDestinationnewConnectionprotected static final Logger LOG
protected HttpClient getHttpClient()
public void setHttpClient(HttpClient client)
HttpClientTransportHttpClient instance on this transport.
This is needed because of a chicken-egg problem: in order to create the HttpClient
a HttpClientTransport is needed, that therefore cannot have a reference yet to the
HttpClient.setHttpClient in interface HttpClientTransportclient - the HttpClient that uses this transport.protected void doStart()
throws Exception
ContainerLifeCycledoStart in class ContainerLifeCycleExceptionprotected void doStop()
throws Exception
ContainerLifeCycledoStop in class ContainerLifeCycleExceptionpublic void connect(SocketAddress address, Map<String,Object> context)
HttpClientTransportaddress.connect in interface HttpClientTransportaddress - the address to connect tocontext - the context information to establish the connectionprotected void configure(HttpClient client, SocketChannel channel) throws IOException
IOExceptionprotected SelectorManager newSelectorManager(HttpClient client)
Copyright © 1995-2015 Webtide. All Rights Reserved.