org.apache.camel.component.xslt
Class XsltEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.impl.ScheduledPollEndpoint
              extended by org.apache.camel.impl.DefaultPollingEndpoint
                  extended by org.apache.camel.impl.ProcessorEndpoint
                      extended by 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


Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
XsltEndpoint(String endpointUri, Component component, XsltBuilder xslt, String resourceUri, boolean cacheStylesheet)
           
 
Method Summary
 void clearCachedStylesheet()
           
protected  void doStart()
          Implementations override this method to support customized start/stop.
protected  void doStop()
          Implementations override this method to support customized start/stop.
 XsltEndpoint findOrCreateEndpoint(String uri, String newResourceUri)
           
 boolean isCacheStylesheet()
           
protected  void loadResource(String resourceUri)
          Loads the resource.
protected  void onExchange(Exchange exchange)
           
 
Methods inherited from class org.apache.camel.impl.ProcessorEndpoint
createPollingConsumer, createProcessor, createProducer, getProcessor, isSingleton, setProcessor
 
Methods inherited from class org.apache.camel.impl.DefaultPollingEndpoint
createConsumer
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureProperties
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

XsltEndpoint

public XsltEndpoint(String endpointUri,
                    Component component,
                    XsltBuilder xslt,
                    String resourceUri,
                    boolean cacheStylesheet)
             throws Exception
Throws:
Exception
Method Detail

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