akka.camel.internal.component
Class ActorEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by akka.camel.internal.component.ActorEndpoint
All Implemented Interfaces:
ActorEndpointConfig

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 org.apache.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.


Constructor Summary
ActorEndpoint(java.lang.String uri, ActorComponent comp, ActorEndpointPath path, Camel camel)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.camel.internal.component.ActorEndpointConfig
autoAck, getAutoAck, getReplyTimeout, replyTimeout, setAutoAck, setReplyTimeout
 

Constructor Detail

ActorEndpoint

public ActorEndpoint(java.lang.String uri,
                     ActorComponent comp,
                     ActorEndpointPath path,
                     Camel camel)
Method Detail

path

public ActorEndpointPath path()
Specified by:
path in interface ActorEndpointConfig

camel

public Camel camel()
Specified by:
camel in interface ActorEndpointConfig

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.

Parameters:
processor - (undocumented)
Returns:
(undocumented)
Throws:
java.lang.UnsupportedOperationException - this method is not supported

createProducer

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

Returns:
a newly created producer

isSingleton

public boolean isSingleton()
Returns true.

Returns:
(undocumented)