|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultComponent
org.apache.camel.impl.HeaderFilterStrategyComponent
org.apache.camel.component.http4.HttpComponent
public class HttpComponent
Defines the HTTP Component
| Field Summary | |
|---|---|
protected org.apache.http.conn.ClientConnectionManager |
clientConnectionManager
|
protected int |
connectionsPerRoute
|
protected HttpBinding |
httpBinding
|
protected HttpClientConfigurer |
httpClientConfigurer
|
protected int |
maxTotalConnections
|
| Constructor Summary | |
|---|---|
HttpComponent()
|
|
| Method Summary | |
|---|---|
protected org.apache.http.params.HttpParams |
configureHttpParams(Map<String,Object> parameters)
|
void |
connect(HttpConsumer consumer)
Connects the URL specified on the endpoint to the specified processor. |
protected org.apache.http.conn.ClientConnectionManager |
createConnectionManager()
|
protected Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
A factory method allowing derived components to create a new endpoint from the given URI, remaining path and optional parameters |
protected HttpClientConfigurer |
createHttpClientConfigurer(Map<String,Object> parameters)
Creates the HttpClientConfigurer based on the given parameters |
void |
disconnect(HttpConsumer consumer)
Disconnects the URL specified on the endpoint from the specified processor. |
org.apache.http.conn.ClientConnectionManager |
getClientConnectionManager()
|
int |
getConnectionsPerRoute()
|
HttpBinding |
getHttpBinding()
|
HttpClientConfigurer |
getHttpClientConfigurer()
|
int |
getMaxTotalConnections()
|
protected void |
registerPort(boolean secure,
int port)
|
void |
setClientConnectionManager(org.apache.http.conn.ClientConnectionManager clientConnectionManager)
|
void |
setConnectionsPerRoute(int connectionsPerRoute)
|
void |
setHttpBinding(HttpBinding httpBinding)
|
void |
setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)
|
void |
setMaxTotalConnections(int maxTotalConnections)
|
void |
start()
Starts the service |
void |
stop()
Stops the service |
protected boolean |
useIntrospectionOnEndpoint()
Derived classes may wish to overload this to prevent the default introspection of URI parameters on the created Endpoint instance |
| Methods inherited from class org.apache.camel.impl.HeaderFilterStrategyComponent |
|---|
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategy |
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HttpClientConfigurer httpClientConfigurer
protected org.apache.http.conn.ClientConnectionManager clientConnectionManager
protected HttpBinding httpBinding
protected int maxTotalConnections
protected int connectionsPerRoute
| Constructor Detail |
|---|
public HttpComponent()
| Method Detail |
|---|
public void connect(HttpConsumer consumer)
throws Exception
consumer - the consumer
Exception - can be thrown
public void disconnect(HttpConsumer consumer)
throws Exception
consumer - the consumer
Exception - can be thrownprotected HttpClientConfigurer createHttpClientConfigurer(Map<String,Object> parameters)
parameters - the map of parameters
protected Endpoint createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
throws Exception
DefaultComponent
createEndpoint in class DefaultComponenturi - the full URI of the endpointremaining - the remaining part of the URI without the query
parameters or component prefixparameters - the optional parameters passed in
Exception
protected void registerPort(boolean secure,
int port)
protected org.apache.http.conn.ClientConnectionManager createConnectionManager()
protected org.apache.http.params.HttpParams configureHttpParams(Map<String,Object> parameters)
throws Exception
Exceptionprotected boolean useIntrospectionOnEndpoint()
DefaultComponent
useIntrospectionOnEndpoint in class DefaultComponentpublic HttpClientConfigurer getHttpClientConfigurer()
public void setHttpClientConfigurer(HttpClientConfigurer httpClientConfigurer)
public org.apache.http.conn.ClientConnectionManager getClientConnectionManager()
public void setClientConnectionManager(org.apache.http.conn.ClientConnectionManager clientConnectionManager)
public HttpBinding getHttpBinding()
public void setHttpBinding(HttpBinding httpBinding)
public int getMaxTotalConnections()
public void setMaxTotalConnections(int maxTotalConnections)
public int getConnectionsPerRoute()
public void setConnectionsPerRoute(int connectionsPerRoute)
public void start()
throws Exception
Service
start in interface Servicestart in class ServiceSupportException - is thrown if starting failed
public void stop()
throws Exception
Service
stop in interface Servicestop in class ServiceSupportException - is thrown if stopping failed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||