Package org.eclipse.jetty.client
Class HttpChannel
java.lang.Object
org.eclipse.jetty.client.HttpChannel
- All Implemented Interfaces:
CyclicTimeouts.Expirable
- Direct Known Subclasses:
HttpChannelOverFCGI,HttpChannelOverHTTP,HttpChannelOverHTTP2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabort(HttpExchange exchange, Throwable requestFailure, Throwable responseFailure) booleanabortResponse(HttpExchange exchange, Throwable failure) booleanassociate(HttpExchange exchange) Associates the givenexchangeto this channel in order to be sent over the network.voiddestroy()booleandisassociate(HttpExchange exchange) voidexchangeTerminated(HttpExchange exchange, Result result) exchangeTerminating(HttpExchange exchange, Result result) protected abstract ConnectionlongReturns the expiration time in nanoseconds.protected abstract HttpReceiverprotected abstract HttpSendervoidproceed(HttpExchange exchange, Throwable failure) abstract voidrelease()voidsend()abstract voidsend(HttpExchange exchange) toString()
-
Constructor Details
-
HttpChannel
-
-
Method Details
-
destroy
public void destroy() -
getHttpDestination
-
associate
Associates the given
exchangeto 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
-
getHttpExchange
-
getConnection
-
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 the current nanoTime, for example:
expireNanoTime = NanoTime.now() + 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
-
getHttpSender
-
getHttpReceiver
-
send
public void send() -
send
-
release
public abstract void release() -
proceed
-
abort
-
abortResponse
-
exchangeTerminating
-
exchangeTerminated
-
toString
-