public abstract class HttpCommonComponent
extends org.apache.camel.support.HeaderFilterStrategyComponent
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowJavaSerializedObject |
protected HttpBinding |
httpBinding |
protected HttpConfiguration |
httpConfiguration |
Constructor and Description |
---|
HttpCommonComponent() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConnect(HttpConsumer consumer)
Checks whether the consumer is possible to connect to the endoint.
|
void |
connect(HttpConsumer consumer)
Connects the URL specified on the endpoint to the specified processor.
|
void |
disconnect(HttpConsumer consumer)
Disconnects the URL specified on the endpoint from the specified processor.
|
HttpBinding |
getHttpBinding() |
HttpConfiguration |
getHttpConfiguration() |
<T> T |
getParameter(Map<String,Object> parameters,
String key,
Class<T> type)
Gets the parameter.
|
<T> T |
getParameter(Map<String,Object> parameters,
String key,
Class<T> type,
T defaultValue)
Gets the parameter.
|
boolean |
isAllowJavaSerializedObject() |
void |
setAllowJavaSerializedObject(boolean allowJavaSerializedObject)
Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object.
|
void |
setHttpBinding(HttpBinding httpBinding)
To use a custom HttpBinding to control the mapping between Camel message and HttpClient.
|
void |
setHttpConfiguration(HttpConfiguration httpConfiguration)
To use the shared HttpConfiguration as base configuration.
|
protected boolean |
useIntrospectionOnEndpoint() |
getHeaderFilterStrategy, setEndpointHeaderFilterStrategy, setHeaderFilterStrategy
afterConfiguration, createEndpoint, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useRawUri, validateParameters, validateURI
build, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@Metadata(label="advanced", description="To use a custom HttpBinding to control the mapping between Camel message and HttpClient.") protected HttpBinding httpBinding
@Metadata(label="advanced", description="To use the shared HttpConfiguration as base configuration.") protected HttpConfiguration httpConfiguration
@Metadata(label="advanced", description="Whether to allow java serialization when a request uses context-type=application/x-java-serialized-object. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk.") protected boolean allowJavaSerializedObject
public <T> T getParameter(Map<String,Object> parameters, String key, Class<T> type)
parameters
- the parameterskey
- the keytype
- the requested type to convert the value from the parameterpublic <T> T getParameter(Map<String,Object> parameters, String key, Class<T> type, T defaultValue)
parameters
- the parameterskey
- the keytype
- the requested type to convert the value from the parameterdefaultValue
- use this default value if the parameter does not contain the keypublic void connect(HttpConsumer consumer) throws Exception
consumer
- the consumerException
- can be thrownpublic void disconnect(HttpConsumer consumer) throws Exception
consumer
- the consumerException
- can be thrownpublic boolean canConnect(HttpConsumer consumer) throws Exception
consumer
- the consumerException
- can be thrownprotected boolean useIntrospectionOnEndpoint()
useIntrospectionOnEndpoint
in class org.apache.camel.support.DefaultComponent
public HttpBinding getHttpBinding()
public void setHttpBinding(HttpBinding httpBinding)
public HttpConfiguration getHttpConfiguration()
public void setHttpConfiguration(HttpConfiguration httpConfiguration)
public boolean isAllowJavaSerializedObject()
public void setAllowJavaSerializedObject(boolean allowJavaSerializedObject)
Apache Camel