akka.camel.internal
Class DefaultCamel

java.lang.Object
  extended by akka.camel.internal.DefaultCamel
All Implemented Interfaces:
Extension, Activation, Camel

public class DefaultCamel
extends java.lang.Object
implements Camel

INTERNAL API Creates an instance of the Camel subsystem.

param: system is used to create internal actors needed by camel instance. Camel doesn't maintain the lifecycle of this actor system. The actor system has to be shut down by the user. In the typical scenario, when camel is used with akka extension, it is natural that camel reuses the actor system it extends. Also by not creating extra internal actor system we are conserving resources.


Constructor Summary
DefaultCamel(ExtendedActorSystem system)
           
 
Method Summary
 scala.concurrent.Future<ActorRef> activationFutureFor(ActorRef endpoint, Timeout timeout, scala.concurrent.ExecutionContext executor)
          Produces a Future with the specified endpoint that will be completed when the endpoint has been activated, or if it times out, which will happen after the specified Timeout.
 org.apache.camel.impl.DefaultCamelContext context()
          Underlying camel context.
 scala.concurrent.Future<ActorRef> deactivationFutureFor(ActorRef endpoint, Timeout timeout, scala.concurrent.ExecutionContext executor)
          Produces a Future which will be completed when the given endpoint has been deactivated or or if it times out, which will happen after the specified Timeout.
 LoggingAdapter log()
           
 CamelSettings settings()
          The settings for the CamelExtension
 void shutdown()
          Stops camel and underlying camel context and template.
 DefaultCamel start()
          Starts camel and underlying camel context and template.
 ActorRef supervisor()
          INTERNAL API Returns the camel supervisor actor.
 ExtendedActorSystem system()
          INTERNAL API Returns the associated ActorSystem.
 org.apache.camel.ProducerTemplate template()
          The Camel ProducerTemplate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCamel

public DefaultCamel(ExtendedActorSystem system)
Method Detail

system

public ExtendedActorSystem system()
Description copied from interface: Camel
INTERNAL API Returns the associated ActorSystem.

Specified by:
system in interface Camel
Returns:
(undocumented)

supervisor

public ActorRef supervisor()
Description copied from interface: Camel
INTERNAL API Returns the camel supervisor actor.

Specified by:
supervisor in interface Camel
Returns:
(undocumented)

log

public LoggingAdapter log()

context

public org.apache.camel.impl.DefaultCamelContext context()
Description copied from interface: Camel
Underlying camel context.

It can be used to configure camel manually, i.e. when the user wants to add new routes or endpoints, i.e.

camel.context.addRoutes(...)
@see org.apache.camel.impl.DefaultCamelContext

Specified by:
context in interface Camel
Returns:
(undocumented)

settings

public CamelSettings settings()
Description copied from interface: Camel
The settings for the CamelExtension

Specified by:
settings in interface Camel
Returns:
(undocumented)

template

public org.apache.camel.ProducerTemplate template()
Description copied from interface: Camel
The Camel ProducerTemplate.

Specified by:
template in interface Camel
Returns:
(undocumented)
See Also:
org.apache.camel.ProducerTemplate

start

public DefaultCamel start()
Starts camel and underlying camel context and template. Only the creator of Camel should start and stop it.

Returns:
(undocumented)
See Also:
akka.camel.DefaultCamel#shutdown()

shutdown

public void shutdown()
Stops camel and underlying camel context and template. Only the creator of Camel should shut it down. There is no need to stop Camel instance, which you get from the CamelExtension, as its lifecycle is bound to the actor system.

See Also:
akka.camel.DefaultCamel#start()

activationFutureFor

public scala.concurrent.Future<ActorRef> activationFutureFor(ActorRef endpoint,
                                                             Timeout timeout,
                                                             scala.concurrent.ExecutionContext executor)
Produces a Future with the specified endpoint that will be completed when the endpoint has been activated, or if it times out, which will happen after the specified Timeout.

Specified by:
activationFutureFor in interface Activation
Parameters:
endpoint - the endpoint to be activated
timeout - the timeout for the Future
executor - (undocumented)
Returns:
(undocumented)

deactivationFutureFor

public scala.concurrent.Future<ActorRef> deactivationFutureFor(ActorRef endpoint,
                                                               Timeout timeout,
                                                               scala.concurrent.ExecutionContext executor)
Produces a Future which will be completed when the given endpoint has been deactivated or or if it times out, which will happen after the specified Timeout.

Specified by:
deactivationFutureFor in interface Activation
Parameters:
endpoint - the endpoint to be deactivated
timeout - the timeout of the Future
executor - (undocumented)
Returns:
(undocumented)