public abstract class HttpChannel extends Object
Modifier | Constructor and Description |
---|---|
protected |
HttpChannel(HttpDestination destination) |
Modifier and Type | Method and Description |
---|---|
boolean |
abort(HttpExchange exchange,
Throwable requestFailure,
Throwable responseFailure) |
boolean |
abortResponse(HttpExchange exchange,
Throwable failure) |
boolean |
associate(HttpExchange exchange)
Associates the given
exchange to this channel in order to be sent over the network. |
boolean |
disassociate(HttpExchange exchange) |
void |
exchangeTerminated(HttpExchange exchange,
Result result) |
HttpDestination |
getHttpDestination() |
HttpExchange |
getHttpExchange() |
protected abstract HttpReceiver |
getHttpReceiver() |
protected abstract HttpSender |
getHttpSender() |
void |
proceed(HttpExchange exchange,
Throwable failure) |
abstract void |
release() |
abstract void |
send() |
String |
toString() |
protected static final Logger LOG
protected HttpChannel(HttpDestination destination)
public HttpDestination getHttpDestination()
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.
exchange
- the exchange to associatepublic boolean disassociate(HttpExchange exchange)
public HttpExchange getHttpExchange()
protected abstract HttpSender getHttpSender()
protected abstract HttpReceiver getHttpReceiver()
public abstract void send()
public abstract void release()
public void proceed(HttpExchange exchange, Throwable failure)
public boolean abort(HttpExchange exchange, Throwable requestFailure, Throwable responseFailure)
public boolean abortResponse(HttpExchange exchange, Throwable failure)
public void exchangeTerminated(HttpExchange exchange, Result result)
Copyright © 1995-2016 Webtide. All Rights Reserved.