org.apache.camel.impl
Class UriEndpointConfiguration

java.lang.Object
  extended by org.apache.camel.impl.UriEndpointConfiguration
All Implemented Interfaces:
EndpointConfiguration

public class UriEndpointConfiguration
extends Object
implements EndpointConfiguration

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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.camel.EndpointConfiguration
EndpointConfiguration.UriFormat
 
Field Summary
 
Fields inherited from interface org.apache.camel.EndpointConfiguration
URI_AUTHORITY, URI_FRAGMENT, URI_HOST, URI_PATH, URI_PORT, URI_QUERY, URI_SCHEME, URI_SCHEME_SPECIFIC_PART, URI_USER_INFO
 
Constructor Summary
UriEndpointConfiguration(CamelContext camelContext, Endpoint endpoint, String uriText)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriEndpointConfiguration

public UriEndpointConfiguration(CamelContext camelContext,
                                Endpoint endpoint,
                                String uriText)
Method Detail

getURI

public URI getURI()
Description copied from interface: EndpointConfiguration
Returns the URI configuration of an Endpoint.

Specified by:
getURI in interface EndpointConfiguration
Returns:
the configuration URI.

setURI

public void setURI(URI uri)

getParameter

public <T> T getParameter(String name)
               throws RuntimeCamelException
Description copied from interface: EndpointConfiguration
Gets the value of a particular parameter.

Specified by:
getParameter in interface EndpointConfiguration
Parameters:
name - the parameter name
Returns:
the configuration URI.
Throws:
RuntimeCamelException - is thrown if error getting the parameter

warnMissingUriParamOnProperty

protected void warnMissingUriParamOnProperty(String name)

setParameter

public <T> void setParameter(String name,
                             T value)
                  throws RuntimeCamelException
Description copied from interface: EndpointConfiguration
Sets the value of a particular parameter.

Specified by:
setParameter in interface EndpointConfiguration
Parameters:
name - the parameter name
value - the parameter value
Throws:
RuntimeCamelException - is thrown if error setting the parameter

toUriString

public String toUriString(EndpointConfiguration.UriFormat format)
Description copied from interface: EndpointConfiguration
Returns the formatted configuration string of an Endpoint.

Specified by:
toUriString in interface EndpointConfiguration
Parameters:
format - the format
Returns:
the configuration URI in String format.

getCamelContext

public CamelContext getCamelContext()

getEndpointClass

public Class<? extends Endpoint> getEndpointClass()

getPropertyConfiguration

public ParameterConfiguration getPropertyConfiguration(String name)
Returns the property configuration for the given property name or null if it does not exist


getPropertyConfigurationMap

public SortedMap<String,ParameterConfiguration> getPropertyConfigurationMap()
Returns the sorted map of all the property names to their ParameterConfiguration objects



Apache Camel