List of usage examples for org.apache.http.nio.protocol HttpAsyncExchange setCallback
void setCallback(Cancellable cancellable);
From source file:org.callimachusproject.server.helpers.Exchange.java
public synchronized void setHttpAsyncExchange(HttpAsyncExchange exchange) { assert exchange != null; this.exchange = exchange; exchange.setCallback(this); if (timeout != -1) { exchange.setTimeout(timeout);/* w w w. ja va 2s . c o m*/ } if (response != null) { exchange.submitResponse(producer = new LoggingResponseProducer(response)); } else if (submitContinue != null) { exchange.submitResponse(submitContinue); } }