Class ProcessorEndpoint

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
ResourceEndpoint

public class ProcessorEndpoint extends DefaultPollingEndpoint
An endpoint which allows exchanges to be sent into it which just invokes a given Processor. This component does not support the use of consumers.


Implementors beware that this endpoint creates producers and consumers which do not allow full control of their lifecycle as Service or SuspendableService would do. If your producers/consumers need more control over their lifecycle it is advised instead to extend DefaultEndpoint, DefaultProducer and DefaultConsumer.

  • Constructor Details

    • ProcessorEndpoint

      protected ProcessorEndpoint()
    • ProcessorEndpoint

      public ProcessorEndpoint(String endpointUri, org.apache.camel.CamelContext context, org.apache.camel.Processor processor)
    • ProcessorEndpoint

      public ProcessorEndpoint(String endpointUri, org.apache.camel.Component component, org.apache.camel.Processor processor)
    • ProcessorEndpoint

      protected ProcessorEndpoint(String endpointUri, org.apache.camel.Component component)
  • Method Details

    • createProducer

      public org.apache.camel.Producer createProducer() throws Exception
      Throws:
      Exception
    • createPollingConsumer

      public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception
      Specified by:
      createPollingConsumer in interface org.apache.camel.Endpoint
      Overrides:
      createPollingConsumer in class DefaultEndpoint
      Throws:
      Exception
    • getProcessor

      public org.apache.camel.Processor getProcessor() throws Exception
      Throws:
      Exception
    • setProcessor

      public void setProcessor(org.apache.camel.Processor processor)
    • createProcessor

      protected org.apache.camel.Processor createProcessor() throws Exception
      Throws:
      Exception
    • onExchange

      protected void onExchange(org.apache.camel.Exchange exchange) throws Exception
      Throws:
      Exception