Package org.eclipse.jetty.client
Class HttpProxy.ProxyConnection
java.lang.Object
org.eclipse.jetty.client.HttpProxy.ProxyConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Connection
,Attachable
- Enclosing class:
HttpProxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
private final Connection
private final Destination
private final Promise
<Connection> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ProxyConnection
(Destination destination, Connection connection, Promise<Connection> promise) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
isClosed()
void
send
(Request request, Response.CompleteListener listener) Sends a request with an associated response listener.void
setAttachment
(Object obj) Attaches the given object to this stream for later retrieval.
-
Field Details
-
destination
-
connection
-
promise
-
attachment
-
-
Constructor Details
-
ProxyConnection
private ProxyConnection(Destination destination, Connection connection, Promise<Connection> promise)
-
-
Method Details
-
send
Description copied from interface:Connection
Sends a request with an associated response listener.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.- Specified by:
send
in interfaceConnection
- Parameters:
request
- the request to sendlistener
- the response listener
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceConnection
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceConnection
- Returns:
- whether this connection has been closed
- See Also:
-
setAttachment
Description copied from interface:Attachable
Attaches the given object to this stream for later retrieval.- Specified by:
setAttachment
in interfaceAttachable
- Parameters:
obj
- the object to attach to this instance
-
getAttachment
- Specified by:
getAttachment
in interfaceAttachable
- Returns:
- the object attached to this instance
- See Also:
-