Example usage for org.apache.http.nio NHttpClientEventHandler getClass

List of usage examples for org.apache.http.nio NHttpClientEventHandler getClass

Introduction

In this page you can find the example usage for org.apache.http.nio NHttpClientEventHandler getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.siddhiesb.transport.http.conn.LoggingUtils.java

public static NHttpClientEventHandler decorate(NHttpClientEventHandler handler) {
    Log log = LogFactory.getLog(handler.getClass());
    if (log.isDebugEnabled()) {
        handler = new LoggingNHttpClientHandler(log, handler);
    }/*from w ww . j  a va 2  s . com*/
    return handler;
}

From source file:org.siddhiesb.transport.http.conn.LoggingNHttpClientHandler.java

public LoggingNHttpClientHandler(final Log log, final NHttpClientEventHandler handler) {
    super();/*from   w w w  .j a v  a  2s.  c  o m*/
    if (handler == null) {
        throw new IllegalArgumentException("HTTP client handler may not be null");
    }
    this.handler = handler;
    this.log = LogFactory.getLog(handler.getClass());
}

From source file:org.apache.synapse.transport.utils.logging.LoggingClientEventHandler.java

/**
 * Create a new instance of the decorator.
 *
 * @param handler The instance of NHttpClientEventHandler to be decorated (wrapped)
 *//*from  ww  w.j  a v  a  2s .  com*/
public LoggingClientEventHandler(final NHttpClientEventHandler handler) {
    if (handler == null) {
        throw new IllegalArgumentException("HTTP client handler must not be null");
    }
    this.handler = handler;
    this.log = LogFactory.getLog(handler.getClass());
}

From source file:org.apache.synapse.transport.utils.logging.LoggingUtils.java

private static NHttpClientEventHandler decorate(NHttpClientEventHandler handler) {
    Log log = LogFactory.getLog(handler.getClass());
    if (log.isDebugEnabled()) {
        handler = new LoggingClientEventHandler(handler);
    }/*from w w  w .  ja v  a 2s  .c  om*/
    return handler;
}