Removing awaitActivation and awaitDeactivation and just retain the future-returning methods as to promote not to block.
This commit is contained in:
parent
52e4a18ebe
commit
7ba74434de
10 changed files with 179 additions and 215 deletions
|
|
@ -30,16 +30,12 @@ public class ActivationTestBase {
|
|||
// get a future reference to the activation of the endpoint of the Consumer Actor
|
||||
FiniteDuration duration = Duration.create(10, SECONDS);
|
||||
Future<ActorRef> activationFuture = camel.activationFutureFor(producer, duration);
|
||||
// or, block wait on the activation
|
||||
camel.awaitActivation(producer, duration);
|
||||
//#CamelActivation
|
||||
//#CamelDeactivation
|
||||
// ..
|
||||
system.stop(producer);
|
||||
// get a future reference to the deactivation of the endpoint of the Consumer Actor
|
||||
Future<ActorRef> deactivationFuture = camel.activationFutureFor(producer, duration);
|
||||
// or, block wait on the deactivation
|
||||
camel.awaitDeactivation(producer, duration);
|
||||
//#CamelDeactivation
|
||||
system.shutdown();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue