Top Inners Fields Constructors Methods
org.eclipse.jetty.client.transport

public Class HttpExchange

extends Object
implements Expirable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.io.CyclicTimeouts.Expirable
Imports
org.eclipse.jetty.client.Request, .Result, org.eclipse.jetty.io.CyclicTimeouts, org.eclipse.jetty.util.Promise, org.eclipse.jetty.util.thread.AutoLock, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private HttpChannel
private final HttpDestination
private final ResponseListeners
private final AutoLock
private static final Logger
private final HttpRequest
private Throwable
private HttpExchange.State
private final HttpResponse
private Throwable
private HttpExchange.State

Constructor Summary

AccessConstructor and Description
public
public
HttpExchange(HttpDestination destination, HttpRequest request, ResponseListeners listeners)

Method Summary

Modifier and TypeMethod and Description
public void
abort(Throwable failure, Promise<Boolean> promise)

pack-priv boolean

Returns:

true if the channel could be associated, false otherwise
associate
(HttpChannel
the channel to associate to this exchange
channel
)

Associates the given channel to this exchange.

private boolean
private boolean
pack-priv void
public HttpConversation
public long
getExpireNanoTime()

Implements org.eclipse.jetty.io.CyclicTimeouts.Expirable.getExpireNanoTime.

Returns the expiration time in nanoseconds.

private HttpChannel
public HttpDestination
public HttpRequest
public Throwable
public HttpResponse
public Throwable
public ResponseListeners
public boolean
private void
public void
proceed(Throwable failure)

public boolean
public void
public boolean
public Result
public Result
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_channelback to summary
private HttpChannel _channel
destinationback to summary
private final HttpDestination destination
listenersback to summary
private final ResponseListeners listeners
lockback to summary
private final AutoLock lock
LOGback to summary
private static final Logger LOG
requestback to summary
private final HttpRequest request
requestFailureback to summary
private Throwable requestFailure
requestStateback to summary
private HttpExchange.State requestState
responseback to summary
private final HttpResponse response
responseFailureback to summary
private Throwable responseFailure
responseStateback to summary
private HttpExchange.State responseState

Constructor Detail

HttpExchangeback to summary
public HttpExchange(HttpDestination destination, HttpRequest request)
HttpExchangeback to summary
public HttpExchange(HttpDestination destination, HttpRequest request, ResponseListeners listeners)

Method Detail

abortback to summary
public void abort(Throwable failure, Promise<Boolean> promise)
associateback to summary
pack-priv boolean associate(HttpChannel channel)

Associates the given channel to this exchange.

Works in strict collaboration with HttpChannel#associate(HttpExchange).

Parameters
channel:HttpChannel

the channel to associate to this exchange

Returns:boolean

true if the channel could be associated, false otherwise

completeRequestback to summary
private boolean completeRequest(Throwable failure)
completeResponseback to summary
private boolean completeResponse(Throwable failure)
disassociateback to summary
pack-priv void disassociate(HttpChannel channel)
getConversationback to summary
public HttpConversation getConversation()
getExpireNanoTimeback to summary
public long getExpireNanoTime()

Implements org.eclipse.jetty.io.CyclicTimeouts.Expirable.getExpireNanoTime.

Doc from org.eclipse.jetty.io.CyclicTimeouts.Expirable.getExpireNanoTime.

Returns the expiration time in nanoseconds.

The value to return must be calculated taking into account the current nanoTime, for example:

expireNanoTime = NanoTime.now() + timeoutNanos

Returning Long#MAX_VALUE indicates that this entity does not expire.

Returns:long

the expiration time in nanoseconds, or Long#MAX_VALUE if this entity does not expire

Annotations
@Override
getHttpChannelback to summary
private HttpChannel getHttpChannel()
getHttpDestinationback to summary
public HttpDestination getHttpDestination()
getRequestback to summary
public HttpRequest getRequest()
getRequestFailureback to summary
public Throwable getRequestFailure()
getResponseback to summary
public HttpResponse getResponse()
getResponseFailureback to summary
public Throwable getResponseFailure()
getResponseListenersback to summary
public ResponseListeners getResponseListeners()
isResponseCompleteback to summary
public boolean isResponseComplete()
notifyFailureCompleteback to summary
private void notifyFailureComplete(Throwable failure)
proceedback to summary
public void proceed(Throwable failure)
requestCompleteback to summary
public boolean requestComplete(Throwable failure)
resetResponseback to summary
public void resetResponse()
responseCompleteback to summary
public boolean responseComplete(Throwable failure)
terminateRequestback to summary
public Result terminateRequest()
terminateResponseback to summary
public Result terminateResponse()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.eclipse.jetty.client.transport back to summary

private final Enum HttpExchange.State

extends Enum<HttpExchange.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final HttpExchange.State
public static final HttpExchange.State
public static final HttpExchange.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static HttpExchange.State
public static HttpExchange.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

COMPLETEDback to summary
public static final HttpExchange.State COMPLETED
PENDINGback to summary
public static final HttpExchange.State PENDING
TERMINATEDback to summary
public static final HttpExchange.State TERMINATED

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static HttpExchange.State valueOf(String name)
valuesback to summary
public static HttpExchange.State[] values()