Examples of HttpComponent


Examples of org.apache.camel.component.http.HttpComponent

                HttpConfiguration config = new HttpConfiguration();
                config.setAuthMethod(AuthMethod.Basic);
                config.setAuthUsername("donald");
                config.setAuthPassword("duck");

                HttpComponent http = context.getComponent("http", HttpComponent.class);
                http.setHttpConfiguration(config);

                from("jetty://http://localhost:9080/test?handlers=myAuthHandler")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class);
View Full Code Here

Examples of org.apache.camel.component.http.HttpComponent

                HttpConfiguration config = new HttpConfiguration();
                config.setAuthMethod(AuthMethod.Basic);
                config.setAuthUsername("donald");
                config.setAuthPassword("duck");

                HttpComponent http = context.getComponent("http", HttpComponent.class);
                http.setHttpConfiguration(config);

                from("jetty://http://localhost:{{port}}/test?handlers=myAuthHandler")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class);
View Full Code Here

Examples of org.apache.camel.component.http.HttpComponent

                HttpConfiguration config = new HttpConfiguration();
                config.setAuthMethod(AuthMethod.Basic);
                config.setAuthUsername("donald");
                config.setAuthPassword("duck");

                HttpComponent http = context.getComponent("http", HttpComponent.class);
                http.setHttpConfiguration(config);

                from("jetty://http://localhost:{{port}}/test?handlers=myAuthHandler")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class);
View Full Code Here

Examples of org.apache.camel.component.http.HttpComponent

                HttpConfiguration config = new HttpConfiguration();
                config.setAuthMethod(AuthMethod.Basic);
                config.setAuthUsername("donald");
                config.setAuthPassword("duck");

                HttpComponent http = context.getComponent("http", HttpComponent.class);
                http.setHttpConfiguration(config);

                from("jetty://http://localhost:{{port}}/test?handlers=myAuthHandler")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class);
View Full Code Here

Examples of org.apache.camel.component.http.HttpComponent

                HttpConfiguration config = new HttpConfiguration();
                config.setAuthMethod(AuthMethod.Basic);
                config.setAuthUsername("donald");
                config.setAuthPassword("duck");

                HttpComponent http = context.getComponent("http", HttpComponent.class);
                http.setHttpConfiguration(config);

                from("jetty://http://localhost:9080/test?handlers=myAuthHandler")
                    .process(new Processor() {
                        public void process(Exchange exchange) throws Exception {
                            HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class);
View Full Code Here

Examples of org.apache.camel.component.http4.HttpComponent

      if(httpEndpoint == null) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("Initializing a new HttpEndpoint ...");
        }
        CamelContext context = exchange.getContext();
        HttpComponent httpComponent = context.getComponent("http4", HttpComponent.class);

        // set the HttpClientConfigurer to override the default HTTP4 values.
        E3HttpClientConfigurer httpClientConfigurer = new E3HttpClientConfigurer();
        adpatConnectionPoolSettings(httpClientConfigurer);
        httpComponent.setHttpClientConfigurer(httpClientConfigurer);
       
        String endpointParameters = "http4://host?throwExceptionOnFailure=false&httpClient.handleRedirects=false";
       
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("Init the HttPEndPoint for API {} is initialized with [{}]", apiId, endpointParameters);
        }
       
        // create endpoint
        httpEndpoint = (HttpEndpoint) httpComponent.createEndpoint(endpointParameters);
       
        // This is a WorkArround to removed the parameters from the target URI (a better solution have to be found)
        httpEndpoint.setHttpUri(new URI("http4://host"));
       
      } else {
View Full Code Here

Examples of org.apache.servicemix.http.HttpComponent

            return new ByteArrayRequestEntity(baos.toByteArray(), writer.getContentType());
        }
    }

    protected HttpClient getClient() {
        HttpComponent comp =  (HttpComponent) endpoint.getServiceUnit().getComponent();
        return comp.getClient();
    }
View Full Code Here

Examples of org.apache.servicemix.http.HttpComponent

        if (path.lastIndexOf('/') >= 0) {
            path = path.substring(path.lastIndexOf('/') + 1);
        }

        // Set protocol, host, and port in the component
        HttpComponent comp = (HttpComponent) endpoint.getServiceUnit().getComponent();
        comp.setProtocol(request.getScheme());
        comp.setHost(request.getServerName());
        comp.setPort(request.getServerPort());
        comp.setPath(request.getContextPath());

        // Reload the wsdl
        endpoint.reloadWsdl();

        Node node = (Node) endpoint.getWsdls().get(path);
View Full Code Here

Examples of org.apache.servicemix.http.HttpComponent

        }
        return headers;
    }
   
    protected ContextManager getServerManager() {
        HttpComponent comp =  (HttpComponent) endpoint.getServiceUnit().getComponent();
        return comp.getServer();
    }
View Full Code Here

Examples of org.apache.servicemix.http.HttpComponent

    protected void addResource(String path, Object resource) {
        resources.put(path, resource);
    }

    protected ContextManager getServerManager() {
        HttpComponent comp = (HttpComponent) getServiceUnit().getComponent();
        return comp.getServer();
    }
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.