|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ponder2.policy.Policy
net.ponder2.policy.ObligationPolicy
public class ObligationPolicy
an obligation policy that performs Event, Condition, Action rules for the SMC
Field Summary |
---|
Fields inherited from class net.ponder2.policy.Policy |
---|
defaultDomain |
Constructor Summary | |
---|---|
ObligationPolicy(P2Object myP2Object)
creates a new obligation policy. |
Method Summary | |
---|---|
protected void |
attach(P2Object aManagedObject)
attaches this policy to aManagedObject. |
void |
event(Event event)
called to deal with an event when one occurs |
P2ManagedObject |
getId()
Called to get an ID to keep track of events |
protected void |
onError(P2Block anErrorBlock)
associates anErrorBlock with the receiver. |
protected P2Object |
operation_action(P2Block aBlock)
adds aBlock to the list of actions of the policy. |
protected P2Boolean |
operation_canExecute(P2Object anEvent)
answers true if anEvent has the values that satisfy all the policy's conditions |
protected P2Object |
operation_condition(P2Block aBlock)
adds aBlock to the list of conditions of the policy. |
protected P2Object |
operation_eaction(P2Block aBlock)
adds aBlock to the list of actions to be handed the whole event when it occurs. |
protected P2Object |
operation_event(P2Object anEventTemplate)
Sets anEventTemplate to be the type of event that this policy should be triggered by. |
protected void |
operation_execute(P2Object anEvent)
executes all the actions using anEvent. |
protected void |
operation_value(P2Object source,
P2Object anEvent)
executes all the actions using anEvent. |
Methods inherited from class net.ponder2.policy.Policy |
---|
getDefaultDomain, isActive, isAttached, operation_active, setActive, setAttached |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObligationPolicy(P2Object myP2Object)
Method Detail |
---|
public void event(Event event) throws Ponder2Exception
EventListener
event
in interface EventListener
event
- the event to be handled
Ponder2Exception
public P2ManagedObject getId()
EventListener
getId
in interface EventListener
protected P2Boolean operation_canExecute(P2Object anEvent) throws Ponder2ArgumentException
anEvent
- the event of the correct type
Ponder2ArgumentException
Ponder2Exception
protected void attach(P2Object aManagedObject)
Policy
attach
in class Policy
aManagedObject
- the managed object that the policy should be attached toprotected void operation_execute(P2Object anEvent)
anEvent
- the event (of the expected event type) to give arguments for the
actionsprotected void operation_value(P2Object source, P2Object anEvent) throws Ponder2Exception
anEvent
- the event (of the expected event type) to give arguments for the
actions
Ponder2Exception
protected P2Object operation_event(P2Object anEventTemplate)
anEventTemplate
- the eventTemplate to be used by this policy
protected P2Object operation_condition(P2Block aBlock)
aBlock
- a condition block
protected P2Object operation_action(P2Block aBlock)
aBlock
- an action block
protected P2Object operation_eaction(P2Block aBlock)
aBlock
- an action block
protected void onError(P2Block anErrorBlock)
anErrorBlock
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |