Class ActorEndpoint

  • All Implemented Interfaces:
    ActorEndpointConfig, 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

    public class ActorEndpoint
    extends org.apache.camel.impl.DefaultEndpoint
    implements ActorEndpointConfig
    INTERNAL API Does what an endpoint does, creates consumers and producers for the component. The ActorEndpoint is a Camel Endpoint that is used to receive messages from Camel. Sending messages from the ActorComponent is not supported, a Producer actor should be used instead.

    The ActorEndpoints are created by the ActorComponent.

    Actors are referenced using actor endpoint URIs of the following format: [actorPath]?[options]%s, where [actorPath] refers to the actor path to the actor.

    • Field Summary

      • Fields inherited from class

        shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean autoAck()  
      void autoAck_$eq​(boolean x$1)  
      Camel camel()  
      org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)
      The ActorEndpoint only supports receiving messages from Camel.
      ActorProducer createProducer()
      Creates a new producer which is used send messages into the endpoint.
      boolean isSingleton()
      Returns true.
      ActorEndpointPath path()  
      scala.concurrent.duration.FiniteDuration replyTimeout()  
      void replyTimeout_$eq​(scala.concurrent.duration.FiniteDuration x$1)  
      • Methods inherited from class org.apache.camel.impl.DefaultEndpoint

        configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
      • Methods inherited from class

        doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, 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
    • Method Detail

      • createConsumer

        public org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)
        The ActorEndpoint only supports receiving messages from Camel. The createProducer method (not to be confused with a producer actor) is used to send messages into the endpoint. The ActorComponent is only there to send to actors registered through an actor endpoint URI. You can use an actor as an endpoint to send to in a camel route (as in, a Camel Consumer Actor). so from(someuri) to (actoruri), but not 'the other way around'. Supporting createConsumer would mean that messages are consumed from an Actor endpoint in a route, and an Actor is not necessarily a producer of messages. Producer Actors can be used for sending messages to some other uri/ component type registered in Camel.
        Specified by:
        createConsumer in interface org.apache.camel.Endpoint
        processor - (undocumented)
        java.lang.UnsupportedOperationException - this method is not supported
      • createProducer

        public ActorProducer createProducer()
        Creates a new producer which is used send messages into the endpoint.

        Specified by:
        createProducer in interface org.apache.camel.Endpoint
        a newly created producer
      • isSingleton

        public boolean isSingleton()
        Returns true.
        Specified by:
        isSingleton in interface org.apache.camel.IsSingleton