HttpDestination, HttpDestinationOverHTTP, MultiplexHttpDestination, PoolingHttpDestinationpublic interface Destination
Destination represents the triple made of the getScheme(), the getHost()
and the getPort().
Destination holds a pool of Connections, but allows to create unpooled
connections if the application wants full control over connection management via newConnection(Promise).
Destinations may be obtained via HttpClient.getDestination(String, String, int)
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getHost() |
|
int |
getPort() |
|
java.lang.String |
getScheme() |
|
void |
newConnection(org.eclipse.jetty.util.Promise<Connection> promise) |
Creates asynchronously a new, unpooled,
Connection that will be returned
at a later time through the given Promise. |
java.lang.String getScheme()
java.lang.String getHost()
int getPort()
void newConnection(org.eclipse.jetty.util.Promise<Connection> promise)
Connection 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);
promise - the promise of a new, unpooled, ConnectionCopyright © 1995–2018 Webtide. All rights reserved.