org.apache.camel.component.http
Class HttpComponent

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultComponent
          extended by org.apache.camel.impl.HeaderFilterStrategyComponent
              extended by org.apache.camel.component.http.HttpComponent
All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.Component, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HeaderFilterStrategyAware, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class HttpComponent
extends org.apache.camel.impl.HeaderFilterStrategyComponent

Defines the HTTP Component

Version:

Field Summary
protected  HttpBinding httpBinding
           
protected  HttpClientConfigurer httpClientConfigurer
           
protected  HttpConfiguration httpConfiguration
           
protected  org.apache.commons.httpclient.HttpConnectionManager httpConnectionManager
           
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
HttpComponent()
           
 
Method Summary
protected  HttpClientConfigurer configureAuth(HttpClientConfigurer configurer, AuthMethod authMethod, String username, String password, String domain, String host, Set<AuthMethod> authMethods)
          Configures the authentication method to be used
protected  HttpClientConfigurer configureProxyAuth(HttpClientConfigurer configurer, AuthMethod authMethod, String username, String password, String domain, String host, Set<AuthMethod> authMethods)
          Configures the proxy authentication method to be used
 void connect(HttpConsumer consumer)
          Connects the URL specified on the endpoint to the specified processor.
protected  org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters)
           
protected  HttpClientConfigurer createHttpClientConfigurer(Map<String,Object> parameters, Set<AuthMethod> authMethods)
          Creates the HttpClientConfigurer based on the given parameters
 void disconnect(HttpConsumer consumer)
          Disconnects the URL specified on the endpoint from the specified processor.
 HttpBinding getHttpBinding()
           
 HttpClientConfigurer getHttpClientConfigurer()
           
 HttpConfiguration getHttpConfiguration()
           
 org.apache.commons.httpclient.HttpConnectionManager getHttpConnectionManager()
           
 void setHttpBinding(HttpBinding httpBinding)
           
 void setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)
           
 void setHttpConfiguration(HttpConfiguration httpConfiguration)
           
 void setHttpConnectionManager(org.apache.commons.httpclient.HttpConnectionManager httpConnectionManager)
           
protected  boolean useIntrospectionOnEndpoint()
           
 
Methods inherited from class org.apache.camel.impl.HeaderFilterStrategyComponent
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategy
 
Methods inherited from class org.apache.camel.impl.DefaultComponent
afterConfiguration, createComponentConfiguration, createConfiguration, createEndpoint, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, useRawUri, validateParameters, validateURI
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

httpClientConfigurer

protected HttpClientConfigurer httpClientConfigurer

httpConnectionManager

protected org.apache.commons.httpclient.HttpConnectionManager httpConnectionManager

httpBinding

protected HttpBinding httpBinding

httpConfiguration

protected HttpConfiguration httpConfiguration
Constructor Detail

HttpComponent

public HttpComponent()
Method Detail

connect

public void connect(HttpConsumer consumer)
             throws Exception
Connects the URL specified on the endpoint to the specified processor.

Parameters:
consumer - the consumer
Throws:
Exception - can be thrown

disconnect

public void disconnect(HttpConsumer consumer)
                throws Exception
Disconnects the URL specified on the endpoint from the specified processor.

Parameters:
consumer - the consumer
Throws:
Exception - can be thrown

createHttpClientConfigurer

protected HttpClientConfigurer createHttpClientConfigurer(Map<String,Object> parameters,
                                                          Set<AuthMethod> authMethods)
Creates the HttpClientConfigurer based on the given parameters

Parameters:
parameters - the map of parameters
Returns:
the configurer

configureAuth

protected HttpClientConfigurer configureAuth(HttpClientConfigurer configurer,
                                             AuthMethod authMethod,
                                             String username,
                                             String password,
                                             String domain,
                                             String host,
                                             Set<AuthMethod> authMethods)
Configures the authentication method to be used

Returns:
configurer to used

configureProxyAuth

protected HttpClientConfigurer configureProxyAuth(HttpClientConfigurer configurer,
                                                  AuthMethod authMethod,
                                                  String username,
                                                  String password,
                                                  String domain,
                                                  String host,
                                                  Set<AuthMethod> authMethods)
Configures the proxy authentication method to be used

Returns:
configurer to used

createEndpoint

protected org.apache.camel.Endpoint createEndpoint(String uri,
                                                   String remaining,
                                                   Map<String,Object> parameters)
                                            throws Exception
Specified by:
createEndpoint in class org.apache.camel.impl.DefaultComponent
Throws:
Exception

useIntrospectionOnEndpoint

protected boolean useIntrospectionOnEndpoint()
Overrides:
useIntrospectionOnEndpoint in class org.apache.camel.impl.DefaultComponent

getHttpClientConfigurer

public HttpClientConfigurer getHttpClientConfigurer()

setHttpClientConfigurer

public void setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)

getHttpConnectionManager

public org.apache.commons.httpclient.HttpConnectionManager getHttpConnectionManager()

setHttpConnectionManager

public void setHttpConnectionManager(org.apache.commons.httpclient.HttpConnectionManager httpConnectionManager)

getHttpBinding

public HttpBinding getHttpBinding()

setHttpBinding

public void setHttpBinding(HttpBinding httpBinding)

getHttpConfiguration

public HttpConfiguration getHttpConfiguration()

setHttpConfiguration

public void setHttpConfiguration(HttpConfiguration httpConfiguration)


Apache Camel