Package org.eclipse.jetty.client.api
Interface Connection
- All Superinterfaces:
- AutoCloseable,- Closeable
- All Known Subinterfaces:
- IConnection
- All Known Implementing Classes:
- HttpConnection,- HttpConnectionOverFCGI,- HttpConnectionOverHTTP,- HttpConnectionOverHTTP2
Connection represent a connection to a Destination and allow applications to send
 requests via send(Request, Response.CompleteListener).
 
 Connections are normally pooled by Destinations, but unpooled Connections
 may be created by applications that want to do their own connection management via
 Destination.newConnection(Promise) and close().
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()default SocketAddressdefault SocketAddressbooleanisClosed()voidsend(Request request, Response.CompleteListener listener) Sends a request with an associated response listener.
- 
Method Details- 
sendSends 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.- Parameters:
- request- the request to send
- listener- the response listener
 
- 
closevoid close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
- 
isClosedboolean isClosed()- Returns:
- whether this connection has been closed
- See Also:
 
- 
getLocalSocketAddress- Returns:
- the local socket address associated with the connection
 
- 
getRemoteSocketAddress- Returns:
- the remote socket address associated with the connection
 
 
-