Package org.eclipse.jetty.client
Class HttpExchange
- java.lang.Object
-
- org.eclipse.jetty.client.HttpExchange
-
- All Implemented Interfaces:
CyclicTimeouts.Expirable
public class HttpExchange extends java.lang.Object implements CyclicTimeouts.Expirable
-
-
Constructor Summary
Constructors Constructor Description HttpExchange(HttpDestination destination, HttpRequest request, java.util.List<Response.ResponseListener> listeners)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
abort(java.lang.Throwable failure)
HttpConversation
getConversation()
long
getExpireNanoTime()
Returns the expiration time in nanoseconds.HttpRequest
getRequest()
java.lang.Throwable
getRequestFailure()
HttpResponse
getResponse()
java.lang.Throwable
getResponseFailure()
java.util.List<Response.ResponseListener>
getResponseListeners()
void
proceed(java.lang.Throwable failure)
boolean
requestComplete(java.lang.Throwable failure)
void
resetResponse()
boolean
responseComplete(java.lang.Throwable failure)
Result
terminateRequest()
Result
terminateResponse()
java.lang.String
toString()
-
-
-
Constructor Detail
-
HttpExchange
public HttpExchange(HttpDestination destination, HttpRequest request, java.util.List<Response.ResponseListener> listeners)
-
-
Method Detail
-
getConversation
public HttpConversation getConversation()
-
getRequest
public HttpRequest getRequest()
-
getRequestFailure
public java.lang.Throwable getRequestFailure()
-
getResponseListeners
public java.util.List<Response.ResponseListener> getResponseListeners()
-
getResponse
public HttpResponse getResponse()
-
getResponseFailure
public java.lang.Throwable getResponseFailure()
-
getExpireNanoTime
public long getExpireNanoTime()
Description copied from interface:CyclicTimeouts.Expirable
Returns the expiration time in nanoseconds.
The value to return must be calculated taking into account
System.nanoTime()
, for example:expireNanoTime = System.nanoTime() + timeoutNanos
Returning
Long.MAX_VALUE
indicates that this entity does not expire.- Specified by:
getExpireNanoTime
in interfaceCyclicTimeouts.Expirable
- Returns:
- the expiration time in nanoseconds, or
Long.MAX_VALUE
if this entity does not expire
-
requestComplete
public boolean requestComplete(java.lang.Throwable failure)
-
responseComplete
public boolean responseComplete(java.lang.Throwable failure)
-
terminateRequest
public Result terminateRequest()
-
terminateResponse
public Result terminateResponse()
-
abort
public boolean abort(java.lang.Throwable failure)
-
resetResponse
public void resetResponse()
-
proceed
public void proceed(java.lang.Throwable failure)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-