Examples of RequestDecoder


Examples of org.apache.giraph.comm.netty.handler.RequestDecoder

          // removed, leaving the pipeline the same as in the non-authenticated
          // configuration except for the presence of the Authorize component.
          return Channels.pipeline(
              byteCounter,
              new LengthFieldBasedFrameDecoder(1024 * 1024 * 1024, 0, 4, 0, 4),
              new RequestDecoder(conf, byteCounter),
              // Removed after authentication completes:
              saslServerHandlerFactory.newHandler(conf),
              new AuthorizeServerHandler(),
              requestServerHandlerFactory.newHandler(workerRequestReservedMap,
                  conf, myTaskInfo),
              // Removed after authentication completes:
              new ResponseEncoder());
        } else {
          LOG.info("start: Using Netty without authentication.");
/*end[HADOOP_NON_SECURE]*/
          ChannelPipeline pipeline = pipeline();

          // Store all connected channels in order to ensure that we can close
          // them on stop(), or else stop() may hang waiting for the
          // connections to close on their own
          pipeline.addLast("connectedChannels",
              new SimpleChannelUpstreamHandler() {
                @Override
                public void channelConnected(ChannelHandlerContext ctx,
                    ChannelStateEvent e) throws Exception {
                  super.channelConnected(ctx, e);
                  accepted.add(e.getChannel());
                }
              });
          pipeline.addLast("serverByteCounter", byteCounter);
          pipeline.addLast("requestFrameDecoder",
              new LengthFieldBasedFrameDecoder(
                  1024 * 1024 * 1024, 0, 4, 0, 4));
          pipeline.addLast("requestDecoder",
              new RequestDecoder(conf, byteCounter));
          pipeline.addLast("requestProcessor",
              requestServerHandlerFactory.newHandler(
                  workerRequestReservedMap, conf, myTaskInfo));
          if (executionHandler != null) {
            pipeline.addAfter(handlerBeforeExecutionHandler,
View Full Code Here

Examples of org.apache.giraph.comm.netty.handler.RequestDecoder

          }
          PipelineUtils.addLastWithExecutorCheck("requestFrameDecoder",
              new LengthFieldBasedFrameDecoder(1024 * 1024 * 1024, 0, 4, 0, 4),
              handlerToUseExecutionGroup, executionGroup, ch);
          PipelineUtils.addLastWithExecutorCheck("requestDecoder",
              new RequestDecoder(conf, inByteCounter),
              handlerToUseExecutionGroup, executionGroup, ch);
          // Removed after authentication completes:
          PipelineUtils.addLastWithExecutorCheck("saslServerHandler",
              saslServerHandlerFactory.newHandler(conf),
              handlerToUseExecutionGroup, executionGroup, ch);
          PipelineUtils.addLastWithExecutorCheck("authorizeServerHandler",
              new AuthorizeServerHandler(), handlerToUseExecutionGroup,
              executionGroup, ch);
          PipelineUtils.addLastWithExecutorCheck("requestServerHandler",
              requestServerHandlerFactory.newHandler(workerRequestReservedMap,
                  conf, myTaskInfo, exceptionHandler),
              handlerToUseExecutionGroup, executionGroup, ch);
          // Removed after authentication completes:
          PipelineUtils.addLastWithExecutorCheck("responseEncoder",
              new ResponseEncoder(), handlerToUseExecutionGroup,
              executionGroup, ch);
        } else {
          LOG.info("start: Using Netty without authentication.");
/*end[HADOOP_NON_SECURE]*/
          // Store all connected channels in order to ensure that we can close
          // them on stop(), or else stop() may hang waiting for the
          // connections to close on their own
          ch.pipeline().addLast("connectedChannels",
              new ChannelInboundHandlerAdapter() {
                @Override
                public void channelActive(ChannelHandlerContext ctx)
                  throws Exception {
                  accepted.add(ctx.channel());
                  ctx.fireChannelActive();
                }
              });
          PipelineUtils.addLastWithExecutorCheck("serverInboundByteCounter",
              inByteCounter, handlerToUseExecutionGroup, executionGroup, ch);
          if (conf.doCompression()) {
            PipelineUtils.addLastWithExecutorCheck("compressionDecoder",
                conf.getNettyCompressionDecoder(),
                handlerToUseExecutionGroup, executionGroup, ch);
          }
          PipelineUtils.addLastWithExecutorCheck("serverOutboundByteCounter",
              outByteCounter, handlerToUseExecutionGroup, executionGroup, ch);
          if (conf.doCompression()) {
            PipelineUtils.addLastWithExecutorCheck("compressionEncoder",
                conf.getNettyCompressionEncoder(),
                handlerToUseExecutionGroup, executionGroup, ch);
          }
          PipelineUtils.addLastWithExecutorCheck("requestFrameDecoder",
              new LengthFieldBasedFrameDecoder(1024 * 1024 * 1024, 0, 4, 0, 4),
              handlerToUseExecutionGroup, executionGroup, ch);
          PipelineUtils.addLastWithExecutorCheck("requestDecoder",
              new RequestDecoder(conf, inByteCounter),
              handlerToUseExecutionGroup, executionGroup, ch);
          PipelineUtils.addLastWithExecutorCheck("requestServerHandler",
              requestServerHandlerFactory.newHandler(
                  workerRequestReservedMap, conf, myTaskInfo, exceptionHandler),
              handlerToUseExecutionGroup, executionGroup, ch);
View Full Code Here

Examples of org.gatein.pc.controller.RequestDecoder

    * @param req the web request
    * @return the decoded controller request
    */
   public ControllerRequest decode(HttpServletRequest req) throws UnsupportedEncodingException
   {
      RequestDecoder decoder = new RequestDecoder(req);
      return decode(decoder.getQueryParameters(), decoder.getBody());
   }
View Full Code Here

Examples of org.gatein.wci.util.RequestDecoder

      {
         throw new IllegalRequestException("HTTP Method " + req.getMethod() + " not accepted");
      }

      //
      RequestDecoder decoder = new RequestDecoder(req);


      //
      this.verb = verb;
      this.queryParameterMap = decoder.getQueryParameters();
      this.body = decoder.getBody();
      this.mediaType = decoder.getMediaType();
   }
View Full Code Here

Examples of org.gatein.wci.util.RequestDecoder

      PortletPageNavigationalState pageNavigationalState = null;
      if (URLParameterConstants.PORTLET_TYPE.equals(type))
      {
         ControllerRequestFactory factory = new ControllerRequestFactory(context.getPageNavigationalStateSerialization());

         RequestDecoder decoder = new RequestDecoder(req);

         ControllerRequest request = factory.decode(decoder.getQueryParameters(), decoder.getBody());

         ControllerResponse controllerResponse;
         try
         {
            controllerResponse = new PortletController().process(context, request);
View Full Code Here

Examples of org.jboss.portal.web.util.RequestDecoder

      {
         throw new IllegalRequestException("HTTP Method " + req.getMethod() + " not accepted");
      }

      //
      RequestDecoder decoder = new RequestDecoder(req);


      //
      this.verb = verb;
      this.queryParameterMap = decoder.getQueryParameters();
      this.body = decoder.getBody();
      this.mediaType = decoder.getMediaType();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.