org.apache.camel.component.xslt
Class XsltEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.impl.ScheduledPollEndpoint
org.apache.camel.impl.DefaultPollingEndpoint
org.apache.camel.impl.ProcessorEndpoint
org.apache.camel.component.xslt.XsltEndpoint
- All Implemented Interfaces:
- CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId, StatefulService, SuspendableService
@ManagedResource(description="Managed XsltEndpoint")
public class XsltEndpoint
- extends ProcessorEndpoint
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
XsltEndpoint
public XsltEndpoint(String endpointUri,
Component component,
XsltBuilder xslt,
String resourceUri,
boolean cacheStylesheet)
throws Exception
- Throws:
Exception
clearCachedStylesheet
@ManagedOperation(description="Clears the cached XSLT stylesheet, forcing to re-load the stylesheet on next request")
public void clearCachedStylesheet()
isCacheStylesheet
@ManagedAttribute(description="Whether the XSLT stylesheet is cached")
public boolean isCacheStylesheet()
findOrCreateEndpoint
public XsltEndpoint findOrCreateEndpoint(String uri,
String newResourceUri)
onExchange
protected void onExchange(Exchange exchange)
throws Exception
- Overrides:
onExchange
in class ProcessorEndpoint
- Throws:
Exception
loadResource
protected void loadResource(String resourceUri)
throws TransformerException,
IOException
- Loads the resource.
- Parameters:
resourceUri
- the resource to load
- Throws:
TransformerException
- is thrown if error loading resource
IOException
- is thrown if error loading resource
doStart
protected void doStart()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: See
ServiceSupport.doStop()
for more details.
- Overrides:
doStart
in class DefaultEndpoint
- Throws:
Exception
- See Also:
ServiceSupport.doStop()
doStop
protected void doStop()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: Camel will invoke this
ServiceSupport.doStop()
method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext
is shutting down.
- Overrides:
doStop
in class DefaultEndpoint
- Throws:
Exception
- See Also:
ServiceSupport.doStart()
Apache CAMEL