Examples of RequestProcessor


Examples of org.apache.wink.server.internal.RequestProcessor

            super.init();
            // try to get the request processor
            // the request processor can be available if it was loaded by a
            // listener
            // or when working with Spring
            RequestProcessor requestProcessor = getRequestProcessor();
            if (requestProcessor == null) {
                // create the request processor
                requestProcessor = createRequestProcessor();
                if (requestProcessor == null) {
                    throw new IllegalStateException("Request processor could not be created.");
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

    }

    protected RequestProcessor createRequestProcessor() throws ClassNotFoundException,
        InstantiationException, IllegalAccessException, IOException {
        DeploymentConfiguration deploymentConfiguration = getDeploymentConfiguration();
        RequestProcessor requestProcessor = new RequestProcessor(deploymentConfiguration);
        logger.debug("Creating request processor {} for servlet {}", requestProcessor, this);
        deploymentConfiguration.addApplication(getApplication(), false);
        return requestProcessor;
    }
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException,
        ServletException {

        RequestProcessor requestProcessor = getRequestProcessor();
        if (requestProcessor == null) {
            throw new ServletException(Messages
                .getMessage("adminServletRequestProcessorInitBeforeAdmin")); //$NON-NLS-1$
        }
        ResourceRegistry registry = requestProcessor.getConfiguration().getResourceRegistry();

        String[] parameterValues = request.getParameterValues(DOCUMENT_TYPE);
        if (parameterValues == null || parameterValues.length == 0) {
            buildAdminHome(response);
            return;
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

            super.init();
            // try to get the request processor
            // the request processor can be available if it was loaded by a
            // listener
            // or when working with Spring
            RequestProcessor requestProcessor = getRequestProcessor();
            if (requestProcessor == null) {
                // create the request processor
                requestProcessor = createRequestProcessor();
                if (requestProcessor == null) {
                    throw new IllegalStateException(Messages
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

    protected RequestProcessor createRequestProcessor() throws ClassNotFoundException,
        InstantiationException, IllegalAccessException, IOException {
        DeploymentConfiguration deploymentConfiguration = getDeploymentConfiguration();
        // order of next two lines is important to allow Application to have control over priority order of Providers
        deploymentConfiguration.addApplication(getApplication(), false);
        RequestProcessor requestProcessor = new RequestProcessor(deploymentConfiguration);
        logger.debug("Creating request processor {} for servlet {}", requestProcessor, this); //$NON-NLS-1$
        return requestProcessor;
    }
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

        fixed = true;
    }

    @Override
    public RequestProcessor getRequestProcessor() {
        RequestProcessor processor = super.getRequestProcessor();
        // The 1st call returns null
        if (processor != null) {
            fixMediaTypes(processor.getConfiguration());
        }
        return processor;
    }
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

 
  private void init() {
    ThreadRootResourceDeploymentConfiguration configuration = new ThreadRootResourceDeploymentConfiguration();
    configuration.init();
    configuration.getProperties().setProperty("wink.rootResource", "none");
    requestProcessor = new RequestProcessor(configuration);
    for (Object component : components) {
      registerComponent(component);
    }
        for (Class componentClass : componentClasses) {
      registerComponentClass(componentClass);
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

            super.init();
            // try to get the request processor
            // the request processor can be available if it was loaded by a
            // listener
            // or when working with Spring
            RequestProcessor requestProcessor = getRequestProcessor();
            if (requestProcessor == null) {
                // create the request processor
                requestProcessor = createRequestProcessor();
                if (requestProcessor == null) {
                    throw new IllegalStateException(Messages
                        .getMessage("restServletRequestProcessorCouldNotBeCreated")); //$NON-NLS-1$
                }
                storeRequestProcessorOnServletContext(requestProcessor);
            }
            if (requestProcessor.getConfiguration().getServletConfig() == null) {
                requestProcessor.getConfiguration().setServletConfig(getServletConfig());
            }
            if (requestProcessor.getConfiguration().getServletContext() == null) {
                requestProcessor.getConfiguration().setServletContext(getServletContext());
            }
        } catch (Exception e) {
            // when exception occurs during the servlet initialization
            // it should be marked as unavailable
            logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

        Application app = getApplication();
        if (app == null) {
            app = getApplication(deploymentConfiguration);
        }
        deploymentConfiguration.addApplication(app, false);
        RequestProcessor requestProcessor = new RequestProcessor(deploymentConfiguration);
        logger.debug("Creating request processor {} for servlet {}", requestProcessor, this); //$NON-NLS-1$
        return requestProcessor;
    }
View Full Code Here

Examples of org.apache.wink.server.internal.RequestProcessor

    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException,
        ServletException {

        RequestProcessor requestProcessor = getRequestProcessor();
        if (requestProcessor == null) {
            throw new ServletException(Messages
                .getMessage("adminServletRequestProcessorInitBeforeAdmin")); //$NON-NLS-1$
        }
        ResourceRegistry registry = requestProcessor.getConfiguration().getResourceRegistry();

        String[] parameterValues = request.getParameterValues(DOCUMENT_TYPE);
        if (parameterValues == null || parameterValues.length == 0) {
            buildAdminHome(response);
            return;
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.