Examples of RequestProcessor


Examples of com.gentics.cr.RequestProcessor

    CRResolvableBean bean;
    if (path != null && !path.equals("")) {
      bean = config.getNewRequestProcessorInstance(1).getFirstMatchingResolvable(
          new CRRequest("object.filename == '" + name + "' AND object.pub_dir == '" + path + "'"));
    } else {
      RequestProcessor rp = config.getNewRequestProcessorInstance(1);
      assertNotNull("Cannot get RequestProcessor from config", rp);
      bean = rp.getFirstMatchingResolvable(new CRRequest("object.filename == '" + name + "'"));
    }
    assertEquals("The contents of the file do not match the content of the RequestProcessor. Therefore the file was not updated.",
        bean.get("binarycontent"), filecontent);
  }
View Full Code Here

Examples of com.googlecode.psiprobe.model.RequestProcessor

                if (includeRequestProcessors) {
                    for (Iterator wrkIt = threadPoolObjectName.getRequestProcessorNames().iterator(); wrkIt.hasNext();) {
                        ObjectName wrkName = (ObjectName) wrkIt.next();

                        try {
                            RequestProcessor rp = new RequestProcessor();
                            rp.setName(wrkName.getKeyProperty("name"));
                            rp.setStage(JmxTools.getIntAttr(server, wrkName, "stage"));
                            rp.setProcessingTime(JmxTools.getLongAttr(server, wrkName, "requestProcessingTime"));
                            rp.setBytesSent(JmxTools.getLongAttr(server, wrkName, "requestBytesSent"));
                            rp.setBytesReceived(JmxTools.getLongAttr(server, wrkName, "requestBytesReceived"));
                            try {
                                String remoteAddr = JmxTools.getStringAttr(server, wrkName, "remoteAddr");
                                rp.setRemoteAddr(remoteAddr);
                                rp.setRemoteAddrLocale(InetAddressLocator.getLocale(InetAddress.getByName(remoteAddr).getAddress()));
                            } catch (RuntimeOperationsException ex) {
                                /*
                                 * if it's not available for this request processor, then it's
                                 * not available for any request processor in this thread pool
                                 */
                                remoteAddrAvailable = false;
                            }
                            rp.setVirtualHost(JmxTools.getStringAttr(server, wrkName, "virtualHost"));
                            rp.setMethod(JmxTools.getStringAttr(server, wrkName, "method"));
                            rp.setCurrentUri(JmxTools.getStringAttr(server, wrkName, "currentUri"));
                            rp.setCurrentQueryString(JmxTools.getStringAttr(server, wrkName, "currentQueryString"));
                            rp.setProtocol(JmxTools.getStringAttr(server, wrkName, "protocol"));

                            // Relies on https://issues.apache.org/bugzilla/show_bug.cgi?id=41128
                            if (workerThreadNameSupported && JmxTools.hasAttribute(server, wrkName, "workerThreadName")) {
                                rp.setWorkerThreadName(JmxTools.getStringAttr(server, wrkName, "workerThreadName"));
                                rp.setWorkerThreadNameSupported(true);
                            } else {
                                //
                                // attribute should consistently either exist or be missing across all the workers so
                                // it does not make sense to check attribute existence
                                // if we have found once that it is not supported
                                //
                                rp.setWorkerThreadNameSupported(false);
                                workerThreadNameSupported = false;
                            }
                            connector.addRequestProcessor(rp);
                        } catch (InstanceNotFoundException e) {
                            logger.info("Failed to query RequestProcessor " + wrkName);
View Full Code Here

Examples of com.linkedin.databus2.core.container.request.RequestProcessor

    _processors.remove(commandName);
  }
 
  public Future<DatabusRequest> run(DatabusRequest request)
  {
    RequestProcessor processor = _processors.get(request.getName());
    if (null == processor)
    {
      processor = UNKOWN_COMMAND_PROCESSOR;
    }
    request.setProcessor(processor);
   
    ExecutorService procExecutor = processor.getExecutorService();
    if (null != procExecutor)
    {
      return procExecutor.submit(request);
    }
    else
View Full Code Here

Examples of com.righettod.jee6s3.runnable.RequestProcessor

    aCtx.setTimeout(25000);// Timeout setted to 25 seconds
    // Add a async events listener
    aCtx.addListener(new Sample02AsyncListener());
    // Launch async processing using a dedicated thread
    ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
    executor.execute(new RequestProcessor(aCtx));
    // Never forget to close the executor in order to release all thread
    // objects link in memory...
    executor.shutdown();
    System.out.println("Sample02AsyncServlet::EndOfDoGet");
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.RequestProcessor

        if (target == null || target.getType() == TargetType.TYPE_NOT_FOUND) {
            return ProviderHelper.notfound(request);
        }

        TargetType type = target.getType();
        RequestProcessor processor = this.requestProcessors.get(type);
        if (processor == null) {
            return ProviderHelper.notfound(request);
        }

        WorkspaceManager wm = getWorkspaceManager(request);
        CollectionAdapter adapter = wm.getCollectionAdapter(request);
        Transactional transaction = adapter instanceof Transactional ? (Transactional) adapter : null;
        ResponseContext response = null;
        try {
            transactionStart(transaction, request);
            response = processor.process(request, wm, adapter);
            response = response != null ? response : processExtensionRequest(request, adapter);           
        } catch (Throwable e) {
            if (e instanceof ResponseContextException) {
                ResponseContextException rce = (ResponseContextException) e;
                if (rce.getStatusCode() >= 400 && rce.getStatusCode() < 500) {
View Full Code Here

Examples of org.apache.abdera.protocol.server.RequestProcessor

                RegistryResolver.VERSIONS_TYPE, RegistryResolver.CHECKPOINT_TYPE,
                RegistryResolver.QUERY_TYPE, RegistryResolver.IMPORT_TYPE,
                RegistryResolver.DUMP_TYPE, RegistryResolver.COLLECTION_CUSTOM_TYPE,
                RegistryResolver.DELETE_TYPE, RegistryResolver.ASPECT_TYPE,
                ResponseTarget.RESPONSE_TYPE};
        RequestProcessor processor = new RegistryRequestProcessor();
        for (TargetType type : types) {
            this.requestProcessors.put(type, processor);
        }

        EmbeddedRegistryService embeddedRegistryService;
View Full Code Here

Examples of org.apache.abdera.protocol.server.RequestProcessor

        if (target == null || target.getType() == TargetType.TYPE_NOT_FOUND) {
            return ProviderHelper.notfound(request);
        }

        TargetType type = target.getType();
        RequestProcessor processor = this.requestProcessors.get(type);
        if (processor == null) {
            return ProviderHelper.notfound(request);
        }

        WorkspaceManager wm = getWorkspaceManager(request);
        CollectionAdapter adapter = wm.getCollectionAdapter(request);
        Transactional transaction = adapter instanceof Transactional ? (Transactional)adapter : null;
        ResponseContext response = null;
        try {
            transactionStart(transaction, request);
            response = processor.process(request, wm, adapter);
            response = response != null ? response : processExtensionRequest(request, adapter);
        } catch (Throwable e) {
            if (e instanceof ResponseContextException) {
                ResponseContextException rce = (ResponseContextException)e;
                if (rce.getStatusCode() >= 400 && rce.getStatusCode() < 500) {
View Full Code Here

Examples of org.apache.cocoon.servlet.RequestProcessor

            if (this.requestProcessor != null) {
                return;
            }

            try {
                this.requestProcessor = new RequestProcessor(WebApplication.get().getServletContext(), sitemapPath,
                        WebAppContextUtils.getCurrentWebApplicationContext());
            } catch (SitemapNotFoundException e) {
                throw new CocoonRuntimeException("Can't initialize Cocoon sitemap.", e);
            } catch (InvalidBaseUrlException e) {
                throw new CocoonRuntimeException("Invalid base URL for the Cocoon sitemap.", e);
View Full Code Here

Examples of org.apache.struts.action.RequestProcessor

                request.getAttribute(Globals.MODULE_KEY);
            if (log.isTraceEnabled()) {
                log.trace("Assigned to module with prefix '" +
                          moduleConfig.getPrefix() + "'");
            }
            RequestProcessor processor =
                getRequestProcessor(moduleConfig, servletContext);
            if (log.isTraceEnabled()) {
                log.trace("Invoking request processor instance " + processor);
            }
            processor.process(request, response);
            context.responseComplete();
        } catch (Exception e) {
            log.error("Exception processing action event " + event, e);
        } finally {
            request.removeAttribute(Constants.ACTION_EVENT_KEY);
View Full Code Here

Examples of org.apache.struts.action.RequestProcessor

     */
    protected RequestProcessor getRequestProcessor(ModuleConfig config,
                                                   ServletContext context) {

        String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix();
        RequestProcessor processor =
            (RequestProcessor) context.getAttribute(key);

        if (processor == null) {
            try {
                if (log.isDebugEnabled()) {
                    log.debug("Instantiating RequestProcessor of class " +
                              config.getControllerConfig().getProcessorClass());
                }
                ActionServlet servlet = (ActionServlet)
                context.getAttribute(Globals.ACTION_SERVLET_KEY);
                processor =
                    (RequestProcessor) RequestUtils.applicationInstance(
                        config.getControllerConfig().getProcessorClass());
                processor.init(servlet, config);
                context.setAttribute(key, processor);
            } catch (Exception e) {
                log.error("Cannot instantiate RequestProcessor of class "
                          + config.getControllerConfig().getProcessorClass(),
                          e);
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.