Example usage for org.apache.http.impl.nio DefaultNHttpServerConnection consumeInput

List of usage examples for org.apache.http.impl.nio DefaultNHttpServerConnection consumeInput

Introduction

In this page you can find the example usage for org.apache.http.impl.nio DefaultNHttpServerConnection consumeInput.

Prototype

public void consumeInput(final NHttpServiceHandler handler) 

Source Link

Usage

From source file:org.apache.synapse.transport.nhttp.ServerIODispatch.java

@Override
protected void onInputReady(final DefaultNHttpServerConnection conn) {
    conn.consumeInput(this.handler);
}

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

public void inputReady(final IOSession session) {
    DefaultNHttpServerConnection conn = (DefaultNHttpServerConnection) session.getAttribute(NHTTP_CONN);
    conn.consumeInput(this.handler);
}

From source file:org.apache.synapse.transport.passthru.core.MultiListenerServerIODispatch.java

@Override
protected void onInputReady(final DefaultNHttpServerConnection defaultNHttpServerConnection) {
    int localPort = defaultNHttpServerConnection.getLocalPort();
    NHttpServerEventHandler handler = handlers.get(localPort);
    try {/*  www.  j  a va2s .  co m*/
        defaultNHttpServerConnection.consumeInput(handler);
    } catch (final Exception ex) {
        handler.exception(defaultNHttpServerConnection, ex);
    }
}

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. j  a  v  a 2s.  c  om*/
        synchronized (sslSession) {
            if (sslSession.isAppInputReady()) {
                conn.consumeInput(this.handler);
            }
            sslSession.inboundTransport();
        }
    } catch (IOException ex) {
        this.handler.exception(conn, ex);
        sslSession.shutdown();
    }
}