public class UriComponentConfiguration extends ComponentConfigurationSupport
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.component| Constructor and Description |
|---|
UriComponentConfiguration(Component component,
java.lang.Class<? extends Endpoint> endpointClass) |
UriComponentConfiguration(Component component,
java.lang.Class<? extends Endpoint> endpointClass,
java.util.SortedMap<java.lang.String,ParameterConfiguration> parameterConfigurationMap) |
UriComponentConfiguration(UriEndpointComponent component) |
| Modifier and Type | Method and Description |
|---|---|
CamelContext |
getCamelContext() |
java.lang.Class<? extends Endpoint> |
getEndpointClass() |
java.lang.Object |
getEndpointParameter(Endpoint endpoint,
java.lang.String name)
Gets the named URI parameter value on the given endpoint
|
java.util.SortedMap<java.lang.String,ParameterConfiguration> |
getParameterConfigurationMap()
Returns the sorted map of all the parameter names to their
ParameterConfiguration objects |
boolean |
isStrictOnParameterNames() |
void |
setEndpointParameter(Endpoint endpoint,
java.lang.String name,
java.lang.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(java.lang.String name) |
protected void |
validatePropertyName(java.lang.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 java.lang.Object |
validatePropertyValue(java.lang.String name,
java.lang.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.
|
completeEndpointPath, configureEndpoint, createEndpoint, createParameterJsonSchema, getBaseUri, getParameter, getParameterConfiguration, getParameters, getUriString, setBaseUri, setParameter, setParameters, setUriStringpublic UriComponentConfiguration(Component component, java.lang.Class<? extends Endpoint> endpointClass, java.util.SortedMap<java.lang.String,ParameterConfiguration> parameterConfigurationMap)
public UriComponentConfiguration(Component component, java.lang.Class<? extends Endpoint> endpointClass)
public UriComponentConfiguration(UriEndpointComponent component)
public java.lang.Object getEndpointParameter(Endpoint endpoint, java.lang.String name) throws RuntimeCamelException
ComponentConfigurationendpoint - the endpoint instancename - the name of the URI query parameterRuntimeCamelException - if the parameter name does not exist on the endpointpublic void setEndpointParameter(Endpoint endpoint, java.lang.String name, java.lang.Object value) throws RuntimeCamelException
ComponentConfigurationendpoint - the endpoint instancename - the name of the URI query parametervalue - the new value of the URI query parameterRuntimeCamelExceptionpublic CamelContext getCamelContext()
public java.lang.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 java.util.SortedMap<java.lang.String,ParameterConfiguration> getParameterConfigurationMap()
ComponentConfigurationParameterConfiguration objectsprotected void validatePropertyName(java.lang.String name)
ComponentConfigurationSupportvalidatePropertyName in class ComponentConfigurationSupportprotected java.lang.Object validatePropertyValue(java.lang.String name,
java.lang.Object value)
ComponentConfigurationSupportvalidatePropertyValue in class ComponentConfigurationSupportprotected void unknownPropertyName(java.lang.String name)
Copyright © 2007-2014 Red Hat, Inc.. All Rights Reserved.