Kanzi Java API
ForwardingAction Class Referenceabstract

ForwardingAction is the base class for the action classes that read and send arguments, such as SetPropertyAction or DispatchMessageAction. More...

Inheritance diagram for ForwardingAction:
[legend]
Collaboration diagram for ForwardingAction:
[legend]

Public Member Functions

void close ()
 Immediately releases the ownership of the backing native object, as opposed to deferring to garbage collection.
 
- Public Member Functions inherited from Action
void close ()
 Immediately releases the ownership of the backing native object, as opposed to deferring to garbage collection.
 
Duration getDelay ()
 Returns the delay that Kanzi waits before it invokes an action. More...
 
Trigger getTrigger ()
 Returns the pointer to a trigger to which an action is attached. More...
 
void invoke ()
 Invokes the action.
 
void setDelay (Duration duration)
 Sets the delay that Kanzi waits before it invokes an action. More...
 
- Public Member Functions inherited from ActionBase
String getName ()
 Gets the name of an action. More...
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to. More...
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object. More...
 
boolean isStale ()
 Test if the object is stale i.e. More...
 
void releaseOwnership ()
 Release ownership of the backing native object from this object. More...
 
void removeLocalValue (PropertyType propertyType)
 Removes the local value associated with the property. More...
 
boolean takeOwnership ()
 Take ownership of the backing native object in this object. More...
 

Static Public Member Functions

static Metaclass getStaticMetaclass ()
 Returns the metaclass of this class. More...
 
- Static Public Member Functions inherited from Action
static Metaclass getStaticMetaclass ()
 Returns the metaclass of this class. More...
 
- Static Public Member Functions inherited from ActionBase
static Metaclass getStaticMetaclass ()
 Returns the metaclass of this class. More...
 
- Static Public Member Functions inherited from KanziObject
static Metaclass getStaticMetaclass ()
 Returns the metaclass of this class. More...
 

Protected Member Functions

 ForwardingAction (Domain domain, String name, Metaclass metaclass)
 Creates a new action of a type derived from ForwardingAction. More...
 
void onAttach ()
 Callback called by Kanzi during attach.
 
void onDelayedInvoke ()
 Callback called by Kanzi when the action is invoked by trigger with delay, after the delay duration expires. More...
 
void onDetach ()
 Callback called by Kanzi during detach.
 
void onInvoke ()
 Callback called by Kanzi when the action is invoked by its trigger without delay. More...
 
void onPrepareDelayedInvoke ()
 Callback called by Kanzi when the action is invoked by its trigger with delay. More...
 
void onUnprepareDelayedInvoke ()
 Kanzi calls this callback when an action is invoked by trigger with delay, after Action#onDelayedInvoke() callback, or when it cancels a delayed execution. More...
 
- Protected Member Functions inherited from Action
 Action (Domain domain, String name, Metaclass metaclass)
 Creates a new action of a type derived from Action. More...
 
void onAttach ()
 Callback called by Kanzi during attach.
 
void onDelayedInvoke ()
 Callback called by Kanzi when the action is invoked by trigger with delay, after the delay duration expires. More...
 
void onDetach ()
 Callback called by Kanzi during detach.
 
void onInvoke ()
 Callback called by Kanzi when the action is invoked by its trigger without delay. More...
 
void onPrepareDelayedInvoke ()
 Callback called by Kanzi when the action is invoked by its trigger with delay. More...
 
void onUnprepareDelayedInvoke ()
 Kanzi calls this callback when an action is invoked by trigger with delay, after Action#onDelayedInvoke() callback, or when it cancels a delayed execution. More...
 

Additional Inherited Members

- Public Attributes inherited from ActionBase
AbstractMetaclass ActionBaseMetaclass = new AbstractMetaclass("Kanzi.ActionBase")
 
- Public Attributes inherited from Action
AbstractMetaclass ActionMetaclass = new AbstractMetaclass("Kanzi.Action")
 
DynamicPropertyType< Integer > DelayProperty
 
- Public Attributes inherited from ForwardingAction
AbstractMetaclass ForwardingActionMetaclass = new AbstractMetaclass("Kanzi.ForwardingAction")
 

Detailed Description

ForwardingAction is the base class for the action classes that read and send arguments, such as SetPropertyAction or DispatchMessageAction.

ForwardingAction contains functionality to read arguments from sources, such as messages, properties or set values, and allows the inheriting action class to use these values. This usually means sending messages or setting values of properties.

Constructor & Destructor Documentation

ForwardingAction ( Domain  domain,
String  name,
Metaclass  metaclass 
)
protected

Creates a new action of a type derived from ForwardingAction.

Call this from constructor of your custom ForwardingAction derivation.

Parameters
domainUI Domain where this action belongs.
nameName of the action.
metaclassMetaclass data for this action.

Member Function Documentation

static Metaclass getStaticMetaclass ( )
static

Returns the metaclass of this class.

Returns
Static instance of metaclass of this Action.
void onDelayedInvoke ( )
protected

Callback called by Kanzi when the action is invoked by trigger with delay, after the delay duration expires.

Use this to execute an action with delay.

void onInvoke ( )
protected

Callback called by Kanzi when the action is invoked by its trigger without delay.

Use this to execute an action without delay.

void onPrepareDelayedInvoke ( )
protected

Callback called by Kanzi when the action is invoked by its trigger with delay.

Use this to prepare for delayed execution.

void onUnprepareDelayedInvoke ( )
protected

Kanzi calls this callback when an action is invoked by trigger with delay, after Action#onDelayedInvoke() callback, or when it cancels a delayed execution.

An example of cancellation of delayed execution is when you detach the action before the execution is done. Use this function to roll back any preparations made for a delayed execution.