org.apache.camel.component
Class ResourceBasedEndpoint
java.lang.Object
org.apache.camel.impl.DefaultEndpoint<E>
org.apache.camel.impl.ScheduledPollEndpoint<E>
org.apache.camel.impl.DefaultPollingEndpoint<Exchange>
org.apache.camel.impl.ProcessorEndpoint
org.apache.camel.component.ResourceBasedEndpoint
- All Implemented Interfaces:
- CamelContextAware, Endpoint<Exchange>
public abstract class ResourceBasedEndpoint
- extends ProcessorEndpoint
A useful base class for endpoints which depend on a resource
such as things like Velocity or XQuery based components.
- Version:
- $Revision: 736637 $
Field Summary |
protected org.apache.commons.logging.Log |
log
|
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
convertTo, createEndpointUri, createExchange, createExchange, createExchange, createExecutorService, equals, getCamelContext, getComponent, getContext, getEndpointUri, getExchangePattern, getExchangeType, getExecutorService, hashCode, isLenientProperties, setCamelContext, setContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setExecutorService, toString |
log
protected final transient org.apache.commons.logging.Log log
ResourceBasedEndpoint
public ResourceBasedEndpoint(String endpointUri,
Component component,
String resourceUri,
Processor processor)
ResourceBasedEndpoint
protected ResourceBasedEndpoint(String endpointUri,
Processor processor,
String resourceUri)
getResource
public Resource getResource()
isContentCache
public boolean isContentCache()
setContentCache
public void setContentCache(boolean contentCache)
- Sets wether to use resource content cache or not - default is false.
- See Also:
getResourceAsInputStream()
getResourceAsInputStream
public InputStream getResourceAsInputStream()
throws IOException
- Gets the resource as an input stream considering the cache flag as well.
If cache is enabled then the resource content is cached in an internal buffer and this content is
returned to avoid loading the resource over and over again.
- Returns:
- the input stream
- Throws:
IOException
- is thrown if error loading the content of the resource to the local cache buffer
getResourceLoader
public ResourceLoader getResourceLoader()
setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader)
getResourceUri
public String getResourceUri()
Apache CAMEL