Example usage for org.apache.http.impl.nio.reactor SSLIOSession isAppInputReady

List of usage examples for org.apache.http.impl.nio.reactor SSLIOSession isAppInputReady

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.reactor SSLIOSession isAppInputReady.

Prototype

public synchronized boolean isAppInputReady() throws IOException 

Source Link

Usage

From source file:org.apache.axis2.transport.nhttp.SSLServerIOEventDispatch.java

public void inputReady(final IOSession session) {
    DefaultNHttpServerConnection conn = (DefaultNHttpServerConnection) session.getAttribute(NHTTP_CONN);
    SSLIOSession sslSession = (SSLIOSession) session.getAttribute(SSL_SESSION);
    try {//from  w w w  .  jav  a  2s.com
        synchronized (sslSession) {
            if (sslSession.isAppInputReady()) {
                conn.consumeInput(this.handler);
            }
            sslSession.inboundTransport();
        }
    } catch (IOException ex) {
        this.handler.exception(conn, ex);
        sslSession.shutdown();
    }
}

From source file:org.apache.axis2.transport.nhttp.SSLClientIOEventDispatch.java

public void inputReady(final IOSession session) {
    DefaultNHttpClientConnection conn = (DefaultNHttpClientConnection) session.getAttribute(NHTTP_CONN);
    SSLIOSession sslSession = (SSLIOSession) session.getAttribute(SSL_SESSION);
    try {/*from   w  w w .  j ava  2s.  co  m*/
        synchronized (sslSession) {
            while (sslSession.isAppInputReady()) {
                conn.consumeInput(this.handler);
            }
            sslSession.inboundTransport();
        }
    } catch (IOException ex) {
        this.handler.exception(conn, ex);
        sslSession.shutdown();
    }
}