|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.impl.ComponentConfigurationSupport org.apache.camel.impl.UriComponentConfiguration
public class UriComponentConfiguration
Implements EndpointConfiguration
for Endpoint implementations
which are annotated with UriEndpoint
to use the UriParam
and UriParams
annotations
to denote its parameters which can be specified via URI query parameters.
Field Summary |
---|
Fields inherited from class org.apache.camel.impl.ComponentConfigurationSupport |
---|
component |
Constructor Summary | |
---|---|
UriComponentConfiguration(Component component,
Class<? extends Endpoint> endpointClass)
|
|
UriComponentConfiguration(Component component,
Class<? extends Endpoint> endpointClass,
SortedMap<String,ParameterConfiguration> parameterConfigurationMap)
|
|
UriComponentConfiguration(UriEndpointComponent component)
|
Method Summary | |
---|---|
CamelContext |
getCamelContext()
|
Class<? extends Endpoint> |
getEndpointClass()
|
Object |
getEndpointParameter(Endpoint endpoint,
String name)
Gets the named URI parameter value on the given endpoint |
SortedMap<String,ParameterConfiguration> |
getParameterConfigurationMap()
Returns the sorted map of all the parameter names to their ParameterConfiguration objects |
boolean |
isStrictOnParameterNames()
|
void |
setEndpointParameter(Endpoint endpoint,
String name,
Object value)
Sets the named URI query parameter value on the given endpoint |
void |
setStrictOnParameterNames(boolean strictOnParameterNames)
Strict mode is enabled by default but if disabled then invalid parameter names will not result in exceptions but we will just log warnings about their use |
protected void |
unknownPropertyName(String name)
|
protected void |
validatePropertyName(String name)
Allow implementations to validate whether a property name is valid and either throw an exception or log a warning of an unknown property being used |
protected Object |
validatePropertyValue(String name,
Object value)
Allow implementations to validate whether a property name is valid and either throw an exception or log a warning of an unknown property being used and to convert the given value to the correct type before updating the value. |
Methods inherited from class org.apache.camel.impl.ComponentConfigurationSupport |
---|
completeEndpointPath, configureEndpoint, createEndpoint, createParameterJsonSchema, getBaseUri, getParameter, getParameterConfiguration, getParameters, getUriString, setBaseUri, setParameter, setParameters, setUriString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UriComponentConfiguration(Component component, Class<? extends Endpoint> endpointClass, SortedMap<String,ParameterConfiguration> parameterConfigurationMap)
public UriComponentConfiguration(Component component, Class<? extends Endpoint> endpointClass)
public UriComponentConfiguration(UriEndpointComponent component)
Method Detail |
---|
public Object getEndpointParameter(Endpoint endpoint, String name) throws RuntimeCamelException
ComponentConfiguration
endpoint
- the endpoint instancename
- the name of the URI query parameter
RuntimeCamelException
- if the parameter name does not exist on the endpointpublic void setEndpointParameter(Endpoint endpoint, String name, Object value) throws RuntimeCamelException
ComponentConfiguration
endpoint
- the endpoint instancename
- the name of the URI query parametervalue
- the new value of the URI query parameter
RuntimeCamelException
public CamelContext getCamelContext()
public Class<? extends Endpoint> getEndpointClass()
public boolean isStrictOnParameterNames()
public void setStrictOnParameterNames(boolean strictOnParameterNames)
strictOnParameterNames
- whether to throw exceptions if invalid
parameter names are used or notpublic SortedMap<String,ParameterConfiguration> getParameterConfigurationMap()
ComponentConfiguration
ParameterConfiguration
objects
protected void validatePropertyName(String name)
ComponentConfigurationSupport
validatePropertyName
in class ComponentConfigurationSupport
protected Object validatePropertyValue(String name, Object value)
ComponentConfigurationSupport
validatePropertyValue
in class ComponentConfigurationSupport
protected void unknownPropertyName(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |