|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectplanet.generic.commonapi.behaviours.BehavioursInvokerImpl
This class is used to invoke a behaviour. It acts like a facade calling a behaviour only when several preconditions are met. Pre-conditions on this default implementation are probability-based.
| Field Summary | |
protected Behaviour |
beh
Behaviour object: this properties is a placeholder for a behaviour. |
protected double |
prob
Behaviour property: probability to be checked. |
| Constructor Summary | |
BehavioursInvokerImpl()
Builds an uninitialized BehavioursInvoker. |
|
| Method Summary | |
java.lang.String |
getName()
|
boolean |
invoke(RouteMessage msg,
Node node)
This method invokes a behaviour. |
BehavioursInvoker |
setValues(Behaviour behaviour,
double probability)
Initializes this invoker with specified values. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Behaviour beh
protected double prob
| Constructor Detail |
public BehavioursInvokerImpl()
| Method Detail |
public BehavioursInvoker setValues(Behaviour behaviour,
double probability)
behaviour - Behaviour to be invoked at any incomming RouteMessageprobability - The probability to be checked at any invokation
of specified Behaviour.
public boolean invoke(RouteMessage msg,
Node node)
invoke in interface BehavioursInvokermsg - The RouteMessage recently arrived.node - The Node which holds the behaviour.
public java.lang.String getName()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||