Example usage for org.apache.http.nio NHttpConnection getStatus

List of usage examples for org.apache.http.nio NHttpConnection getStatus

Introduction

In this page you can find the example usage for org.apache.http.nio NHttpConnection getStatus.

Prototype

int getStatus();

Source Link

Document

Returns status of the connection:

#ACTIVE : connection is active.

Usage

From source file:org.jclouds.http.httpnio.pool.NioHttpCommandConnectionPool.java

@Override
public void shutdownConnection(NHttpConnection conn) {
    if (conn.getStatus() == NHttpConnection.ACTIVE) {
        try {//from w ww .j a  v  a  2 s . c  om
            conn.shutdown();
        } catch (IOException e) {
            logger.error(e, "Error shutting down connection");
        }
    }
}