-
Notifications
You must be signed in to change notification settings - Fork 24
Pointcuts
#Here are our pointcuts
Pointcut for the actorOf(..)
methods in ActorRefFactory
implementations, extracting the Props
being used
private static pointcut unnamedActorOf(Props props) :
execution(* akka.actor.ActorRefFactory+.actorOf(*)) && args(props);
Pointcut for the actorOf(..)
methods in ActorRefFactory
implementations where actor is named on creation, extracting the Props
being used
private static pointcut namedActorOf(Props props) :
execution(* akka.actor.ActorRefFactory+.actorOf(*,*)) && args(props, *);
Public pointcut for combining the pointcuts of named-actor and unnamed-actor usages of actorOf(..)
in ActorRefFactory
implementations
static pointcut anyActorOf(Props props) : namedActorOf(props) || unnamedActorOf(props);
Pointcut for ActorCell.stop(actor)
, extracting the ActorRef
of the actor being stopped
static pointcut actorCellStop(ActorRef actor) : execution(* akka.actor.ActorCell.stop(..)) && args(actor);
Pointcut for ActorCell.stop()
, extracting the ActorCell
whose stop() method is being executed
static pointcut actorCellInternalStop(ActorCell actorCell) : target(actorCell) && execution(* akka.actor.ActorCell.stop());
Pointcut for ActorCell.receiveMessage(msg)
, extracting the ActorCell
receiving the message, and the Object
message being received
static pointcut actorCellReceiveMessage(ActorCell actorCell, Object msg) : target(actorCell) &&
call(* akka.actor.ActorCell.receiveMessage(..)) && args(msg);
Pointcut for ActorCell.handleInvokeFailure(_, failure)
, extracting the ActorCell
handling the failure, and the Throwable
cause of the failure
static pointcut actorCellHandleInvokeFailure(ActorCell actorCell, Throwable failure) : target(actorCell) &&
execution(* akka.actor.ActorCell.handleInvokeFailure(..)) && args(*, failure);
Pointcut for the EventStream.publish(event)
method, extracting just the Object
event
static pointcut eventStreamPublish(Object event) :
execution(* akka.event.EventStream.publish(..)) && args(event);
http://eclipse.org/aspectj/doc/next/quick5.pdf <- this is useful. A cheatsheet for aspectJ syntax.