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

public abstract Class HttpChannel

extends Object
implements Expirable
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.io.CyclicTimeouts.Expirable
Known Direct Subclasses
org.eclipse.jetty.client.transport.internal.HttpChannelOverHTTP
Imports
org.eclipse.jetty.client.Connection, .Result, org.eclipse.jetty.io.CyclicTimeouts, org.eclipse.jetty.util.Promise, org.eclipse.jetty.util.thread.AutoLock, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final HttpDestination
private HttpExchange
private final AutoLock
private static final Logger

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
abort(HttpExchange exchange, Throwable requestFailure, Throwable responseFailure, Promise<Boolean> promise)

public void
abortResponse(HttpExchange exchange, Throwable failure, Promise<Boolean> promise)

public boolean

Returns:

true if the association was successful, false otherwise
associate
(HttpExchange
the exchange to associate
exchange
)

Associates the given exchange to this channel in order to be sent over the network.

public void
public boolean

Returns:

true if the exchange was disassociated, false otherwise
disassociate
(HttpExchange
the current exchange that must be already completed
exchange
)

Disassociates the exchange from this channel.

public void
public Result
protected abstract Connection
public long
getExpireNanoTime()

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

Returns the expiration time in nanoseconds.

public HttpDestination
public HttpExchange

Returns:

the HttpExchange currently associated with this channel, possibly null.
getHttpExchange
()

Returns the HttpExchange currently associated with this channel, possibly null.

protected abstract HttpReceiver
protected abstract HttpSender
public void
proceed(HttpExchange exchange, Throwable failure)

public abstract void
public void
send()

public abstract void
send(HttpExchange exchange)

public String
toString()

Overrides java.lang.Object.toString.

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

Field Detail

_destinationback to summary
private final HttpDestination _destination
_exchangeback to summary
private HttpExchange _exchange
_lockback to summary
private final AutoLock _lock
LOGback to summary
private static final Logger LOG

Constructor Detail

HttpChannelback to summary
protected HttpChannel(HttpDestination destination)

Method Detail

abortback to summary
public void abort(HttpExchange exchange, Throwable requestFailure, Throwable responseFailure, Promise<Boolean> promise)
abortResponseback to summary
public void abortResponse(HttpExchange exchange, Throwable failure, Promise<Boolean> promise)
associateback to summary
public boolean associate(HttpExchange exchange)

Associates the given exchange to this channel in order to be sent over the network.

If the association is successful, the exchange can be sent. Otherwise, the channel must be disposed because whoever terminated the exchange did not do it - it did not have the channel yet.

Parameters
exchange:HttpExchange

the exchange to associate

Returns:boolean

true if the association was successful, false otherwise

destroyback to summary
public void destroy()
disassociateback to summary
public boolean disassociate(HttpExchange exchange)

Disassociates the exchange from this channel.

Parameters
exchange:HttpExchange

the current exchange that must be already completed

Returns:boolean

true if the exchange was disassociated, false otherwise

exchangeTerminatedback to summary
public void exchangeTerminated(HttpExchange exchange, Result result)
exchangeTerminatingback to summary
public Result exchangeTerminating(HttpExchange exchange, Result result)
getConnectionback to summary
protected abstract Connection getConnection()
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
getHttpDestinationback to summary
public HttpDestination getHttpDestination()
getHttpExchangeback to summary
public HttpExchange getHttpExchange()

Returns the HttpExchange currently associated with this channel, possibly null.

The exchange may be completed and disassociated concurrently, so callers must act atomically on the exchange.

Returns:HttpExchange

the HttpExchange currently associated with this channel, possibly null.

getHttpReceiverback to summary
protected abstract HttpReceiver getHttpReceiver()
getHttpSenderback to summary
protected abstract HttpSender getHttpSender()
proceedback to summary
public void proceed(HttpExchange exchange, Throwable failure)
releaseback to summary
public abstract void release()
sendback to summary
public void send()
sendback to summary
public abstract void send(HttpExchange exchange)
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