org.apache.camel
Interface Component

All Superinterfaces:
CamelContextAware
All Known Implementing Classes:
BeanComponent, BindingComponent, BindingNameComponent, BrowseComponent, ClassComponent, ControlBusComponent, DataFormatComponent, DataSetComponent, DefaultComponent, DirectComponent, DirectVmComponent, FileComponent, GenericFileComponent, HeaderFilterStrategyComponent, LanguageComponent, LogComponent, MockComponent, PropertiesComponent, RefComponent, SedaComponent, StubComponent, TestComponent, TimerComponent, UriEndpointComponent, ValidatorComponent, VmComponent, XsltComponent

public interface Component
extends CamelContextAware

A component is a factory of Endpoint objects.

Version:

Method Summary
 ComponentConfiguration createComponentConfiguration()
          Creates a configuration helper object for a component that lets you configure the various URI and parameter values; then create the full URI for it, create a new Endpoint from it or configure an existing Endpoint from the values.
 EndpointConfiguration createConfiguration(String uri)
          Attempt to create a configuration object from the given uri
 Endpoint createEndpoint(String uri)
          Attempt to resolve an endpoint for the given URI if the component is capable of handling the URI.
 boolean useRawUri()
          Whether to use raw or encoded uri, when creating endpoints.
 
Methods inherited from interface org.apache.camel.CamelContextAware
getCamelContext, setCamelContext
 

Method Detail

createEndpoint

Endpoint createEndpoint(String uri)
                        throws Exception
Attempt to resolve an endpoint for the given URI if the component is capable of handling the URI.

See useRawUri() for controlling whether the passed in uri should be as-is (raw), or encoded (default).

Parameters:
uri - the URI to create; either raw or encoded (default)
Returns:
a newly created Endpoint or null if this component cannot create Endpoint instances using the given uri
Throws:
Exception - is thrown if error creating the endpoint
See Also:
useRawUri()

useRawUri

boolean useRawUri()
Whether to use raw or encoded uri, when creating endpoints.

Notice: When using raw uris, then the parameter values is raw as well.

Returns:
true to use raw uris, false to use encoded uris (default).
Since:
Camel 2.11.0

createConfiguration

EndpointConfiguration createConfiguration(String uri)
                                          throws Exception
Attempt to create a configuration object from the given uri

Parameters:
uri - the configuration URI
Returns:
a newly created EndpointConfiguration
Throws:
Exception - is thrown if the configuration URI is invalid
Since:
Camel 2.9.0

createComponentConfiguration

ComponentConfiguration createComponentConfiguration()
Creates a configuration helper object for a component that lets you configure the various URI and parameter values; then create the full URI for it, create a new Endpoint from it or configure an existing Endpoint from the values. This method is intended to be used in cases where there is not yet a full URI to configure an endpoint yet; but rather there are a number of parameters to configure to then build up a new URI or directly create an Endpoint from the parameter values.



Apache Camel