private class HttpProxy.TunnelPromise extends java.lang.Object implements Promise<Connection>
Promise.Adapter<U>, Promise.Completable<S>, Promise.Wrapper<W>
Modifier and Type | Field and Description |
---|---|
private Response.CompleteListener |
listener |
private Promise<Connection> |
promise |
private Request |
request |
Modifier | Constructor and Description |
---|---|
private |
TunnelPromise(Request request,
Response.CompleteListener listener,
Promise<Connection> promise) |
Modifier and Type | Method and Description |
---|---|
void |
failed(java.lang.Throwable x)
Callback invoked when the operation fails.
|
private void |
setEndPoint(EndPoint endPoint) |
void |
succeeded(Connection connection)
Callback invoked when the operation completes.
|
private final Request request
private final Response.CompleteListener listener
private final Promise<Connection> promise
private TunnelPromise(Request request, Response.CompleteListener listener, Promise<Connection> promise)
public void succeeded(Connection connection)
Promise
Callback invoked when the operation completes.
succeeded
in interface Promise<Connection>
connection
- the contextPromise.failed(Throwable)
public void failed(java.lang.Throwable x)
Promise
Callback invoked when the operation fails.
failed
in interface Promise<Connection>
x
- the reason for the operation failureprivate void setEndPoint(EndPoint endPoint)