public abstract class HttpDestination extends Object implements Destination, Closeable, org.eclipse.jetty.util.component.Dumpable
| Modifier and Type | Field and Description |
|---|---|
protected static org.eclipse.jetty.util.log.Logger |
LOG |
| Constructor and Description |
|---|
HttpDestination(HttpClient client,
Origin origin) |
public HttpDestination(HttpClient client, Origin origin)
protected Queue<HttpExchange> newExchangeQueue(HttpClient client)
protected ClientConnectionFactory newSslClientConnectionFactory(ClientConnectionFactory connectionFactory)
public HttpClient getHttpClient()
public Origin getOrigin()
public Queue<HttpExchange> getHttpExchanges()
public RequestNotifier getRequestNotifier()
public ResponseNotifier getResponseNotifier()
public ProxyConfiguration.Proxy getProxy()
public ClientConnectionFactory getClientConnectionFactory()
public String getScheme()
getScheme in interface Destinationpublic String getHost()
getHost in interface Destinationpublic int getPort()
getPort in interface Destinationpublic Origin.Address getConnectAddress()
public HttpField getHostField()
protected void send(HttpRequest request, List<Response.ResponseListener> listeners)
public void send(HttpExchange exchange)
protected boolean enqueue(Queue<HttpExchange> queue, HttpExchange exchange)
protected abstract void send()
public void newConnection(org.eclipse.jetty.util.Promise<Connection> promise)
DestinationConnection that will be returned
at a later time through the given Promise.
Use FuturePromise to wait for the connection:
Destination destination = ...; FuturePromise<Connection> futureConnection = new FuturePromise<>(); destination.newConnection(futureConnection); Connection connection = futureConnection.get(5, TimeUnit.SECONDS);
newConnection in interface Destinationpromise - the promise of a new, unpooled, Connectionprotected void createConnection(org.eclipse.jetty.util.Promise<Connection> promise)
public boolean remove(HttpExchange exchange)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void release(Connection connection)
public void close(Connection connection)
public void abort(Throwable cause)
HttpExchanges queued in this destination.cause - the abort causepublic String dump()
dump in interface org.eclipse.jetty.util.component.Dumpablepublic void dump(Appendable out, String indent) throws IOException
dump in interface org.eclipse.jetty.util.component.DumpableIOExceptionpublic String asString()
Copyright © 1995-2018 Webtide. All Rights Reserved.