Package org.eclipse.jetty.client
Class HttpProxy.ProxyConnection
- java.lang.Object
-
- org.eclipse.jetty.client.HttpProxy.ProxyConnection
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Connection,Attachable
- Enclosing class:
- HttpProxy
private static class HttpProxy.ProxyConnection extends java.lang.Object implements Connection, Attachable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectattachmentprivate Connectionconnectionprivate Destinationdestinationprivate Promise<Connection>promise
-
Constructor Summary
Constructors Modifier Constructor Description privateProxyConnection(Destination destination, Connection connection, Promise<Connection> promise)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.ObjectgetAttachment()booleanisClosed()voidsend(Request request, Response.CompleteListener listener)Sends a request with an associated response listener.voidsetAttachment(java.lang.Object obj)Attaches the given object to this stream for later retrieval.
-
-
-
Field Detail
-
destination
private final Destination destination
-
connection
private final Connection connection
-
promise
private final Promise<Connection> promise
-
attachment
private java.lang.Object attachment
-
-
Constructor Detail
-
ProxyConnection
private ProxyConnection(Destination destination, Connection connection, Promise<Connection> promise)
-
-
Method Detail
-
send
public void send(Request request, Response.CompleteListener listener)
Description copied from interface:ConnectionSends 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:
sendin interfaceConnection- Parameters:
request- the request to sendlistener- the response listener
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceConnection
-
isClosed
public boolean isClosed()
- Specified by:
isClosedin interfaceConnection- Returns:
- whether this connection has been closed
- See Also:
Connection.close()
-
setAttachment
public void setAttachment(java.lang.Object obj)
Description copied from interface:AttachableAttaches the given object to this stream for later retrieval.- Specified by:
setAttachmentin interfaceAttachable- Parameters:
obj- the object to attach to this instance
-
getAttachment
public java.lang.Object getAttachment()
- Specified by:
getAttachmentin interfaceAttachable- Returns:
- the object attached to this instance
- See Also:
Attachable.setAttachment(Object)
-
-