Package org.eclipse.jetty.client
Class HttpConnection
java.lang.Object
org.eclipse.jetty.client.HttpConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Connection
,Attachable
- Direct Known Subclasses:
HttpConnectionOverHTTP.Delegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
private final HttpDestination
private int
private long
private static final Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
applyProxyAuthentication
(Request request, ProxyConfiguration.Proxy proxy) private void
applyRequestAuthentication
(Request request) private StringBuilder
convertCookies
(List<HttpCookie> cookies, StringBuilder builder) protected void
normalizeRequest
(Request request) boolean
onIdleTimeout
(long idleTimeout) void
send
(Request request, Response.CompleteListener listener) Sends a request with an associated response listener.protected SendFailure
send
(HttpChannel channel, HttpExchange exchange) protected abstract SendFailure
send
(HttpExchange exchange) void
setAttachment
(Object obj) Attaches the given object to this stream for later retrieval.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.client.api.Connection
close, isClosed
-
Field Details
-
LOG
-
destination
-
attachment
-
idleTimeoutGuard
private int idleTimeoutGuard -
idleTimeoutStamp
private long idleTimeoutStamp
-
-
Constructor Details
-
HttpConnection
-
-
Method Details
-
getHttpClient
-
getHttpDestination
-
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
-
send
-
normalizeRequest
-
convertCookies
-
applyRequestAuthentication
-
applyProxyAuthentication
-
send
-
onIdleTimeout
public boolean onIdleTimeout(long idleTimeout) -
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:
-
toString
-