akka.camel.internal.component
Class CamelPath

java.lang.Object
  extended by akka.camel.internal.component.CamelPath

public class CamelPath
extends java.lang.Object

Converts ActorRefs and actorPaths to URI's that point to the actor through the Camel Actor Component. Can also be used in the Java API as a helper for custom route builders. the Scala API has an implicit conversion in the camel package to directly use to(actorRef). In java you could use to(CamelPath.toUri(actorRef). The URI to the actor is exactly the same as the string representation of the ActorPath, except that it can also have optional URI parameters to configure the Consumer Actor.


Constructor Summary
CamelPath()
           
 
Method Summary
static java.lang.String toUri(ActorRef actorRef)
          Converts the actorRef to a Camel URI (string) which can be used in custom routes.
static java.lang.String toUri(ActorRef actorRef, boolean autoAck, scala.concurrent.duration.Duration replyTimeout)
          Converts the actorRef to a Camel URI (string) which can be used in custom routes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelPath

public CamelPath()
Method Detail

toUri

public static java.lang.String toUri(ActorRef actorRef)
Converts the actorRef to a Camel URI (string) which can be used in custom routes. The created URI will have no parameters, it is purely the string representation of the actor's path.

Parameters:
actorRef - the actorRef
Returns:
the Camel URI to the actor.

toUri

public static java.lang.String toUri(ActorRef actorRef,
                                     boolean autoAck,
                                     scala.concurrent.duration.Duration replyTimeout)
Converts the actorRef to a Camel URI (string) which can be used in custom routes. Use this version of toUri when you know that the actorRef points to a Consumer Actor and you would like to set autoAck and replyTimeout parameters to non-default values.

Parameters:
actorRef - the actorRef
autoAck - parameter for a Consumer Actor, see ConsumerConfig
replyTimeout - parameter for a Consumer Actor, see ConsumerConfig
Returns:
the Camel URI to the Consumer Actor, including the parameters for auto acknowledgement and replyTimeout.