org.apache.camel.component.http
Class HttpComponent

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultComponent<HttpExchange>
          extended by org.apache.camel.component.http.HttpComponent
All Implemented Interfaces:
Component<HttpExchange>, HeaderFilterStrategyAware, Service

public class HttpComponent
extends DefaultComponent<HttpExchange>
implements HeaderFilterStrategyAware

Defines the HTTP Component

Version:
$Revision: 731164 $

Field Summary
protected  HeaderFilterStrategy headerFilterStrategy
           
protected  HttpBinding httpBinding
           
protected  HttpClientConfigurer httpClientConfigurer
           
protected  org.apache.commons.httpclient.HttpConnectionManager httpConnectionManager
           
 
Constructor Summary
HttpComponent()
           
 
Method Summary
protected  void configureParameters(Map parameters)
          Setting http binding and http client configurer according to the parameters Also setting the BasicAuthenticationHttpClientConfigurer if the username and password option are not null.
 void connect(HttpConsumer consumer)
          Connects the URL specified on the endpoint to the specified processor.
protected  Endpoint createEndpoint(String uri, String remaining, Map parameters)
           
 void disconnect(HttpConsumer consumer)
          Disconnects the URL specified on the endpoint from the specified processor.
 HeaderFilterStrategy getHeaderFilterStrategy()
           
 HttpBinding getHttpBinding()
           
 HttpClientConfigurer getHttpClientConfigurer()
           
 org.apache.commons.httpclient.HttpConnectionManager getHttpConnectionManager()
           
 void setHeaderFilterStrategy(HeaderFilterStrategy strategy)
           
 void setHttpBinding(HttpBinding httpBinding)
           
 void setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)
           
 void setHttpConnectionManager(org.apache.commons.httpclient.HttpConnectionManager httpConnectionManager)
           
protected  boolean useIntrospectionOnEndpoint()
           
 
Methods inherited from class org.apache.camel.impl.DefaultComponent
convertTo, createEndpoint, createExecutorService, doStart, doStop, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getExecutorService, lookup, lookup, mandatoryConvertTo, mandatoryLookup, mandatoryLookup, newInstance, setCamelContext, setExecutorService, setProperties, validateURI
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getThreadName, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop
 
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

headerFilterStrategy

protected HeaderFilterStrategy headerFilterStrategy

httpBinding

protected HttpBinding httpBinding
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

configureParameters

protected void configureParameters(Map parameters)
Setting http binding and http client configurer according to the parameters Also setting the BasicAuthenticationHttpClientConfigurer if the username and password option are not null.

Parameters:
parameters - the map of parameters

createEndpoint

protected Endpoint createEndpoint(String uri,
                                  String remaining,
                                  Map parameters)
                           throws Exception
Specified by:
createEndpoint in class DefaultComponent<HttpExchange>
Throws:
Exception

useIntrospectionOnEndpoint

protected boolean useIntrospectionOnEndpoint()
Overrides:
useIntrospectionOnEndpoint in class DefaultComponent<HttpExchange>

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)

getHeaderFilterStrategy

public HeaderFilterStrategy getHeaderFilterStrategy()
Specified by:
getHeaderFilterStrategy in interface HeaderFilterStrategyAware

setHeaderFilterStrategy

public void setHeaderFilterStrategy(HeaderFilterStrategy strategy)
Specified by:
setHeaderFilterStrategy in interface HeaderFilterStrategyAware

getHttpBinding

public HttpBinding getHttpBinding()

setHttpBinding

public void setHttpBinding(HttpBinding httpBinding)


Copyright © 2009 Apache Software Foundation. All Rights Reserved.