public class DefaultCamel extends java.lang.Object implements Camel
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 and Description |
---|
DefaultCamel(ExtendedActorSystem system) |
Modifier and Type | Method and Description |
---|---|
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.
|
public DefaultCamel(ExtendedActorSystem system)
public ExtendedActorSystem system()
Camel
public ActorRef supervisor()
Camel
supervisor
in interface Camel
public LoggingAdapter log()
public org.apache.camel.impl.DefaultCamelContext context()
Camel
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.DefaultCamelContextpublic CamelSettings settings()
Camel
public org.apache.camel.ProducerTemplate template()
Camel
public DefaultCamel start()
shutdown()
public void shutdown()
start()
public scala.concurrent.Future<ActorRef> activationFutureFor(ActorRef endpoint, Timeout timeout, scala.concurrent.ExecutionContext executor)
activationFutureFor
in interface Activation
endpoint
- the endpoint to be activatedtimeout
- the timeout for the Futureexecutor
- (undocumented)public scala.concurrent.Future<ActorRef> deactivationFutureFor(ActorRef endpoint, Timeout timeout, scala.concurrent.ExecutionContext executor)
deactivationFutureFor
in interface Activation
endpoint
- the endpoint to be deactivatedtimeout
- the timeout of the Futureexecutor
- (undocumented)