Package com.barchart.http.request

Examples of com.barchart.http.request.RequestHandler


    if (response != null) {

      try {

        final RequestHandler handler = response.handler();

        if (handler != null) {
          handler.onComplete(response.request(), response);
        }

      } finally {

        messagePool.makeAvailable(response.request());
View Full Code Here


    // Create request/response
    final PooledServerRequest request = messagePool.getRequest();
    request.init(ctx.channel(), msg, relativePath);

    final RequestHandler handler = mapping.handler(request);

    final PooledServerResponse response = messagePool.getResponse();
    response.init(ctx, handler, request, config.logger());

    // Store in ChannelHandlerContext for future reference
    ctx.attr(ATTR_RESPONSE).set(response);

    try {

      // Process request
      handler.onRequest(request, response);

    } catch (final Throwable t) {

      // Catch server errors
      response.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
View Full Code Here

    if (response != null && !response.isFinished()) {

      try {

        final RequestHandler handler = response.handler();

        if (handler != null) {
          handler.onAbort(response.request(), response);
        }

      } finally {

        // response.close() calls handler.onComplete() also
View Full Code Here

    if (response != null && !response.isFinished()) {

      try {

        final RequestHandler handler = response.handler();

        if (handler != null) {
          handler.onException(response.request(), response, exception);
        }

        config.logger().error(response.request(), response, exception);

      } finally {
View Full Code Here

TOP

Related Classes of com.barchart.http.request.RequestHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.