Example usage for org.apache.http.nio NHttpServerEventHandler connected

List of usage examples for org.apache.http.nio NHttpServerEventHandler connected

Introduction

In this page you can find the example usage for org.apache.http.nio NHttpServerEventHandler connected.

Prototype

void connected(NHttpServerConnection conn) throws IOException, HttpException;

Source Link

Document

Triggered when a new incoming connection is created.

Usage

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

@Override
protected void onConnected(final DefaultNHttpServerConnection defaultNHttpServerConnection) {
    int localPort = defaultNHttpServerConnection.getLocalPort();
    NHttpServerEventHandler handler = handlers.get(localPort);
    try {/*  ww w. j  av a 2 s . c o  m*/
        handler.connected(defaultNHttpServerConnection);
    } catch (final Exception ex) {
        handler.exception(defaultNHttpServerConnection, ex);
    }
}