Class HttpExchange
java.lang.Object
org.eclipse.jetty.client.HttpExchange
- All Implemented Interfaces:
CyclicTimeouts.Expirable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HttpChannelprivate final HttpDestinationprivate final List<Response.ResponseListener> private static final Loggerprivate final HttpRequestprivate Throwableprivate HttpExchange.Stateprivate final HttpResponseprivate Throwableprivate HttpExchange.State -
Constructor Summary
ConstructorsConstructorDescriptionHttpExchange(HttpDestination destination, HttpRequest request, List<Response.ResponseListener> listeners) -
Method Summary
Modifier and TypeMethodDescriptionboolean(package private) booleanassociate(HttpChannel channel) Associates the givenchannelto this exchange.private booleancompleteRequest(Throwable failure) private booleancompleteResponse(Throwable failure) (package private) voiddisassociate(HttpChannel channel) longReturns the expiration time in nanoseconds.private HttpChannelprivate voidnotifyFailureComplete(Throwable failure) voidbooleanrequestComplete(Throwable failure) voidbooleanresponseComplete(Throwable failure) toString()
-
Field Details
-
LOG
-
destination
-
request
-
listeners
-
response
-
requestState
-
responseState
-
_channel
-
requestFailure
-
responseFailure
-
-
Constructor Details
-
HttpExchange
public HttpExchange(HttpDestination destination, HttpRequest request, List<Response.ResponseListener> listeners)
-
-
Method Details
-
getConversation
-
getRequest
-
getRequestFailure
-
getResponseListeners
-
getResponse
-
getResponseFailure
-
getExpireNanoTime
public long getExpireNanoTime()Description copied from interface:CyclicTimeouts.ExpirableReturns the expiration time in nanoseconds.
The value to return must be calculated taking into account
System.nanoTime(), for example:expireNanoTime = System.nanoTime() + timeoutNanosReturning
Long.MAX_VALUEindicates that this entity does not expire.- Specified by:
getExpireNanoTimein interfaceCyclicTimeouts.Expirable- Returns:
- the expiration time in nanoseconds, or
Long.MAX_VALUEif this entity does not expire
-
associate
Associates the given
channelto this exchange.Works in strict collaboration with
HttpChannel.associate(HttpExchange).- Parameters:
channel- the channel to associate to this exchange- Returns:
- true if the channel could be associated, false otherwise
-
disassociate
-
getHttpChannel
-
requestComplete
-
completeRequest
-
responseComplete
-
completeResponse
-
terminateRequest
-
terminateResponse
-
abort
-
notifyFailureComplete
-
resetResponse
public void resetResponse() -
proceed
-
toString
-