akka.camel
Interface Consumer

All Superinterfaces:
Actor
All Known Implementing Classes:
UntypedConsumerActor

public interface Consumer
extends Actor

Mixed in by Actor implementations that consume message from Camel endpoints.


Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Method Summary
 scala.concurrent.duration.FiniteDuration activationTimeout()
          How long the actor should wait for activation before it fails.
 boolean autoAck()
          Determines whether one-way communications between an endpoint and this consumer actor should be auto-acknowledged or application-acknowledged.
 Camel camel()
          INTERNAL API Returns a Camel trait which provides access to the CamelExtension.
 org.apache.camel.impl.DefaultCamelContext camelContext()
          Returns the CamelContext.
 java.lang.String endpointUri()
          Must return the Camel endpoint URI that the consumer wants to consume messages from.
 Mapper<org.apache.camel.model.RouteDefinition,> getRouteDefinitionHandler()
          Java API: Returns the Mapper function that will be used as a route definition handler for creating custom route to this consumer.
 Mapper<org.apache.camel.model.RouteDefinition,> identityRouteMapper()
           
 scala.Function1<org.apache.camel.model.RouteDefinition,> onRouteDefinition()
          Returns the route definition handler for creating a custom route to this consumer.
 void preStart()
          Registers the consumer endpoint.
 void register()
           
 scala.concurrent.duration.FiniteDuration 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.
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, noSender, postRestart, postStop, preRestart, receive, self, sender, supervisorStrategy, unhandled
 

Method Detail

identityRouteMapper

Mapper<org.apache.camel.model.RouteDefinition,> identityRouteMapper()

endpointUri

java.lang.String endpointUri()
Must return the Camel endpoint URI that the consumer wants to consume messages from.


preStart

void preStart()
Registers the consumer endpoint. Note: when overriding this method, be sure to call 'super.preRestart', otherwise the consumer endpoint will not be registered.

Specified by:
preStart in interface Actor

register

void register()

activationTimeout

scala.concurrent.duration.FiniteDuration activationTimeout()
How long the actor should wait for activation before it fails.


replyTimeout

scala.concurrent.duration.FiniteDuration 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.


autoAck

boolean 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.


onRouteDefinition

scala.Function1<org.apache.camel.model.RouteDefinition,> onRouteDefinition()
Returns the route definition handler for creating a custom route to this consumer. By default it returns an identity function, override this method to return a custom route definition handler. The returned function is not allowed to close over 'this', meaning it is not allowed to refer to the actor instance itself, since that can easily cause concurrent shared state issues.


getRouteDefinitionHandler

Mapper<org.apache.camel.model.RouteDefinition,> getRouteDefinitionHandler()
Java API: Returns the Mapper function that will be used as a route definition handler for creating custom route to this consumer. By default it returns an identity function, override this method to return a custom route definition handler. The Mapper is not allowed to close over 'this', meaning it is not allowed to refer to the actor instance itself, since that can easily cause concurrent shared state issues.


camel

Camel camel()
INTERNAL API Returns a Camel trait which provides access to the CamelExtension.


camelContext

org.apache.camel.impl.DefaultCamelContext camelContext()
Returns the CamelContext. The camelContext is defined implicit for simplifying the use of CamelMessage from the Scala API.