public class UriEndpointConfiguration extends Object implements EndpointConfiguration
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.EndpointConfiguration.UriFormat
URI_AUTHORITY, URI_FRAGMENT, URI_HOST, URI_PATH, URI_PORT, URI_QUERY, URI_SCHEME, URI_SCHEME_SPECIFIC_PART, URI_USER_INFO
Constructor and Description |
---|
UriEndpointConfiguration(CamelContext camelContext,
Endpoint endpoint,
String uriText) |
Modifier and Type | Method and Description |
---|---|
CamelContext |
getCamelContext() |
Class<? extends Endpoint> |
getEndpointClass() |
<T> T |
getParameter(String name)
Gets the value of a particular parameter.
|
ParameterConfiguration |
getPropertyConfiguration(String name)
Returns the property configuration for the given property name or null if it does not exist
|
SortedMap<String,ParameterConfiguration> |
getPropertyConfigurationMap()
Returns the sorted map of all the property names to their
ParameterConfiguration objects |
URI |
getURI()
Returns the URI configuration of an
Endpoint . |
<T> void |
setParameter(String name,
T value)
Sets the value of a particular parameter.
|
void |
setURI(URI uri) |
String |
toUriString(EndpointConfiguration.UriFormat format)
Returns the formatted configuration string of an
Endpoint . |
protected void |
warnMissingUriParamOnProperty(String name) |
public UriEndpointConfiguration(CamelContext camelContext, Endpoint endpoint, String uriText)
public URI getURI()
EndpointConfiguration
Endpoint
.getURI
in interface EndpointConfiguration
public <T> T getParameter(String name) throws RuntimeCamelException
EndpointConfiguration
getParameter
in interface EndpointConfiguration
name
- the parameter nameRuntimeCamelException
- is thrown if error getting the parameterprotected void warnMissingUriParamOnProperty(String name)
public <T> void setParameter(String name, T value) throws RuntimeCamelException
EndpointConfiguration
setParameter
in interface EndpointConfiguration
name
- the parameter namevalue
- the parameter valueRuntimeCamelException
- is thrown if error setting the parameterpublic String toUriString(EndpointConfiguration.UriFormat format)
EndpointConfiguration
Endpoint
.toUriString
in interface EndpointConfiguration
format
- the formatpublic CamelContext getCamelContext()
public Class<? extends Endpoint> getEndpointClass()
public ParameterConfiguration getPropertyConfiguration(String name)
public SortedMap<String,ParameterConfiguration> getPropertyConfigurationMap()
ParameterConfiguration
objectsApache Camel