Package org.eclipse.jetty.client
Class HttpChannel
- java.lang.Object
-
- org.eclipse.jetty.client.HttpChannel
-
- All Implemented Interfaces:
CyclicTimeouts.Expirable
- Direct Known Subclasses:
HttpChannelOverHTTP
public abstract class HttpChannel extends java.lang.Object implements CyclicTimeouts.Expirable
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.eclipse.jetty.util.log.Logger
LOG
-
Constructor Summary
Constructors Modifier Constructor Description protected
HttpChannel(HttpDestination destination)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
abort(HttpExchange exchange, java.lang.Throwable requestFailure, java.lang.Throwable responseFailure)
boolean
abortResponse(HttpExchange exchange, java.lang.Throwable failure)
boolean
associate(HttpExchange exchange)
Associates the givenexchange
to this channel in order to be sent over the network.void
destroy()
boolean
disassociate(HttpExchange exchange)
void
exchangeTerminated(HttpExchange exchange, Result result)
Result
exchangeTerminating(HttpExchange exchange, Result result)
long
getExpireNanoTime()
HttpDestination
getHttpDestination()
HttpExchange
getHttpExchange()
protected abstract HttpReceiver
getHttpReceiver()
protected abstract HttpSender
getHttpSender()
void
proceed(HttpExchange exchange, java.lang.Throwable failure)
abstract void
release()
void
send()
abstract void
send(HttpExchange exchange)
java.lang.String
toString()
-
-
-
Constructor Detail
-
HttpChannel
protected HttpChannel(HttpDestination destination)
-
-
Method Detail
-
destroy
public void destroy()
-
getHttpDestination
public HttpDestination getHttpDestination()
-
associate
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
- the exchange to associate- Returns:
- true if the association was successful, false otherwise
-
disassociate
public boolean disassociate(HttpExchange exchange)
-
getHttpExchange
public HttpExchange getHttpExchange()
-
getExpireNanoTime
public long getExpireNanoTime()
- Specified by:
getExpireNanoTime
in interfaceCyclicTimeouts.Expirable
-
getHttpSender
protected abstract HttpSender getHttpSender()
-
getHttpReceiver
protected abstract HttpReceiver getHttpReceiver()
-
send
public void send()
-
send
public abstract void send(HttpExchange exchange)
-
release
public abstract void release()
-
proceed
public void proceed(HttpExchange exchange, java.lang.Throwable failure)
-
abort
public boolean abort(HttpExchange exchange, java.lang.Throwable requestFailure, java.lang.Throwable responseFailure)
-
abortResponse
public boolean abortResponse(HttpExchange exchange, java.lang.Throwable failure)
-
exchangeTerminating
public Result exchangeTerminating(HttpExchange exchange, Result result)
-
exchangeTerminated
public void exchangeTerminated(HttpExchange exchange, Result result)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-