Examples of RequestHandler


Examples of com.adito.boot.RequestHandler

      if (log.isDebugEnabled())
        log.debug("Request for " + pathInContext);
        for (Iterator i = requestHandlers.iterator(); i.hasNext();) {
            try {
                request.setCharacterEncoding(SystemProperties.get("adito.encoding", "UTF-8"), false);
                RequestHandler handler = (RequestHandler) i.next();
                ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
                Thread.currentThread().setContextClassLoader(handler.getClass().getClassLoader());
                if (handler.handle(pathInContext, pathParams, new RequestAdapter(request), new ResponseAdapter(response))) {
                    request.setHandled(true);
                    break;
                }
                Thread.currentThread().setContextClassLoader(oldLoader);
            } catch (RequestHandlerException e) {

Examples of com.alibaba.citrus.webx.handler.RequestHandler

            public void run(RunData rundata, PipelineContext pipelineContext) throws Exception {
                throw new IllegalStateException("wrong!");
            }
        });

        setErrorHandler(controller, new RequestHandler() {
            public void handleRequest(RequestHandlerContext ctx) throws Exception {
                throw new IllegalArgumentException("wrong again!");
            }
        });

Examples of com.barchart.http.request.RequestHandler

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

    final RequestHandler handler = mapping.handler(request);

    final PooledServerResponse response = new PooledServerResponse();
    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 Exception e) {

      // Catch server errors
      response.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);

Examples of com.esri.gpt.server.csw.provider.components.RequestHandler

   
    // process the request
    LOGGER.fine("Executing CSW provider request....");
    String cswResponse = "";
    String mimeType = "application/xml";
    RequestHandler handler = null;
    OperationResponse opResponse = null;
    try {
      String cswRequest = readInputCharacters(request);
      LOGGER.finer("cswRequest:\n"+cswRequest);
      handler = this.makeRequestHandler(request,response,context);
      if (cswRequest.length() > 0) {
        opResponse = handler.handleXML(cswRequest);
      } else {
        opResponse = handler.handleGet(request);
      }
      if (opResponse != null) {
        cswResponse = Val.chkStr(opResponse.getResponseXml());
        String fmt = Val.chkStr(opResponse.getOutputFormat());
        if (fmt.equalsIgnoreCase("text/xml")) {
          mimeType = "text/xml";
        }
      }
    } catch (Exception e) {
      OperationContext opContext = null;
      if (handler != null) {
        opContext = handler.getOperationContext();
      }
      cswResponse = handleException(opContext,e);
    }
   
    // write the response

Examples of com.netflix.staash.mesh.messages.RequestHandler

    }

    @Override
    public void onMessage(Message message, AsyncResponse response) {
        try {
            RequestHandler handler = verbHandlers.get(message.getVerb());
            if (handler != null) {
                handler.onMessage(message,  response);
            }
        }
        catch (Exception e) {
            // Notify error
        }

Examples of com.ponysdk.test.UiBuilderTestEntryPoint.RequestHandler

    @Test
    public void testPAnchor() {

        // creation
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                final PAnchor anchor = new PAnchor("An anchor");
                anchor.ensureDebugId("anchor1");
                PRootPanel.get().add(anchor);

                register(anchor);
            }
        });

        WebElement element = findElementById("anchor1");
        Assert.assertEquals("An anchor", element.getText());

        // update text
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                final PAnchor anchor = get("anchor1");
                anchor.setText("New text of the anchor");
            }
        });

        element = findElementById("anchor1");
        Assert.assertEquals("New text of the anchor", element.getText());

        // update html
        updateUI(new RequestHandler() {

            @Override
            public void onRequest() {
                final PAnchor anchor = get("anchor1");
                anchor.setHTML("Anchor <font color='red'>with pure html</font>");

Examples of com.zenesis.qx.remote.RequestHandler

  /**
   * Posts a request to the tracker and returns the result as a string
   */
  protected String postRequest(Reader reader) throws IOException, ServletException {
    StringWriter sw = new StringWriter();
    new RequestHandler(tracker).processRequest(reader, sw);
    return sw.toString();
  }

Examples of es.internna.framework.spring.mvc.RequestHandler

        Map beans = context.getBeansOfType(RequestHandler.class);
        log.info("Got request handlers " + beans.keySet().size());
        if (beans != null) {
            for (Object beanName : beans.keySet()) {
                log.info("Processing " + beanName);
                RequestHandler requestHandler = (RequestHandler) beans.get(beanName);
                log.info("Obtained " + requestHandler);
                AutowireToController autowireTo = ClassUtils.getAnnotation(AutowireToController.class, requestHandler);
                log.info("Autowire? " + autowireTo);
                if (autowireTo != null) wire (context, requestHandler, autowireTo);
                log.info("Wired");

Examples of es.internna.spring.mvc.api.RequestHandler

        Map beans = context.getBeansOfType(RequestHandler.class);
        log.info("Got request handlers " + beans.keySet().size());
        if (beans != null) {
            for (Object beanName : beans.keySet()) {
                log.info("Processing " + beanName);
                RequestHandler requestHandler = (RequestHandler) beans.get(beanName);
                log.info("Obtained " + requestHandler);
                AutowireToController autowireTo = ClassUtils.getAnnotation(AutowireToController.class, requestHandler);
                log.info("Autowire? " + autowireTo);
                if (autowireTo != null) wire (context, requestHandler, autowireTo);
                log.info("Wired");

Examples of io.reactivex.netty.protocol.http.server.RequestHandler

    @SuppressWarnings("rawtypes")
    @Inject
    public void setInjector(Injector injector) {
        HttpServerConfig config = (HttpServerConfig) injector.getInstance(serverConfigKey);

        RequestHandler router = injector.getInstance(routerKey);

        GovernatorHttpInterceptorSupport<I, O> interceptorSupport = injector.getInstance(interceptorSupportKey);
        interceptorSupport.finish(injector);
        HttpRequestHandler<I, O> httpRequestHandler = new HttpRequestHandler<I, O>(router, interceptorSupport);
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.