Package akka.camel

Class ActorRouteDefinition<T extends org.apache.camel.model.ProcessorDefinition<T>>


  • public class ActorRouteDefinition<T extends org.apache.camel.model.ProcessorDefinition<T>>
    extends java.lang.Object
    Wraps a ProcessorDefinition. There is an implicit conversion in the akka.camel package object that converts a ProcessorDefinition into this type. Because of this conversion, it is possible to use an ActorRef as a to parameter in building a route:
    
       class TestRoute(system: ActorSystem) extends RouteBuilder {
         val responder = system.actorOf(Props[TestResponder], name = "TestResponder")
    
         def configure {
           from("direct:producer").to(responder)
         }
       }
     
    param: definition the processor definition
    • Constructor Summary

      Constructors 
      Constructor Description
      ActorRouteDefinition​(org.apache.camel.model.ProcessorDefinition<T> definition)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T to​(ActorRef actorRef)
      Sends the message to an ActorRef endpoint.
      T to​(ActorRef actorRef, boolean autoAck, scala.concurrent.duration.Duration replyTimeout)
      Sends the message to an ActorRef endpoint
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActorRouteDefinition

        public ActorRouteDefinition​(org.apache.camel.model.ProcessorDefinition<T> definition)
    • Method Detail

      • to

        public T to​(ActorRef actorRef)
        Sends the message to an ActorRef endpoint.
        Parameters:
        actorRef - the actorRef to the actor.
        Returns:
        the path to the actor, as a camel uri String
      • to

        public T to​(ActorRef actorRef,
                    boolean autoAck,
                    scala.concurrent.duration.Duration replyTimeout)
        Sends the message to an ActorRef endpoint
        Parameters:
        actorRef - the consumer
        autoAck - Determines whether one-way communications between an endpoint and this consumer actor should be auto-acknowledged or application-acknowledged. This flag has only effect when exchange is in-only.
        replyTimeout - When endpoint is out-capable (can produce responses) replyTimeout is the maximum time the endpoint can take to send the response before the message exchange fails. It defaults to 1 minute. This setting is used for out-capable, in-only, manually acknowledged communication.
        Returns:
        the path to the actor, as a camel uri String