Example usage for org.apache.http.nio.protocol HttpAsyncExchange setTimeout

List of usage examples for org.apache.http.nio.protocol HttpAsyncExchange setTimeout

Introduction

In this page you can find the example usage for org.apache.http.nio.protocol HttpAsyncExchange setTimeout.

Prototype

void setTimeout(int timeout);

Source Link

Document

Sets timeout for this message exchange.

Usage

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);
    }/*from   w w  w  . j a  v  a2 s .  com*/
    if (response != null) {
        exchange.submitResponse(producer = new LoggingResponseProducer(response));
    } else if (submitContinue != null) {
        exchange.submitResponse(submitContinue);
    }
}