private static class HttpProxy.ProxyConnection extends java.lang.Object implements Connection
Modifier and Type | Field and Description |
---|---|
private Connection |
connection |
private Destination |
destination |
private Promise<Connection> |
promise |
Modifier | Constructor and Description |
---|---|
private |
ProxyConnection(Destination destination,
Connection connection,
Promise<Connection> promise) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isClosed() |
void |
send(Request request,
Response.CompleteListener listener)
Sends a request with an associated response listener.
|
private final Destination destination
private final Connection connection
private final Promise<Connection> promise
private ProxyConnection(Destination destination, Connection connection, Promise<Connection> promise)
public void send(Request request, Response.CompleteListener listener)
Connection
Request.send(Response.CompleteListener)
will eventually call this method to send the request.
It is exposed to allow applications to send requests via unpooled connections.
send
in interface Connection
request
- the request to sendlistener
- the response listenerpublic void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface Connection
public boolean isClosed()
isClosed
in interface Connection
Connection.close()