Kanzi 3.9.10
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]

Public Member Functions

void close ()
 Close the object, and release native resources.
 
- Public Member Functions inherited from Action
Duration getDelay ()
 Returns the delay that Kanzi waits before it invokes an action.
 
Trigger getTrigger ()
 Returns the pointer to a trigger to which an action is attached.
 
void invoke ()
 Invokes the action.
 
void setDelay (Duration duration)
 Sets the delay that Kanzi waits before it invokes an action.
 
- Public Member Functions inherited from ActionBase
String getName ()
 Gets the name of an action.
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to.
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object.
 
long getNative ()
 Gets a pointer to the backing C++ instance.
 
TDataType getOptionalProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type, but does not use the default value if there are no inputs to the property value.
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type.
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value.
 
boolean isStale ()
 Test if the object is stale i.e.
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property.
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type.
 
ObjectRef< TTypetryCreateObjectRef (Class< TType > clazz)
 Tries to create an owning ObjectRef instance to this KanziObject.
 

Static Public Attributes

static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from Action
static final Metaclass metaclass = com.rightware.kanzi.metadata.ActionMetadata.metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from ActionBase
static final Metaclass metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from KanziObject
static final Metaclass metaclass = new AbstractMetaclass("Kanzi.Object")
 The Metaclass for the class.
 

Protected Member Functions

 ForwardingAction (Domain domain, long handle, Metaclass metaclass)
 Wraps a given native ForwardingAction.
 
void initialize ()
 Initializes the ForwardingAction.
 
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.
 
void onDetach ()
 Callback called by Kanzi during detach.
 
void onInvoke ()
 Callback called by Kanzi when the action is invoked by its trigger without delay.
 
void onPrepareDelayedInvoke ()
 Callback called by Kanzi when the action is invoked by its trigger with delay.
 
void onUnprepareDelayedInvoke ()
 Kanzi calls this callback when an action is invoked by trigger with delay, after com.rightware.kanzi.Action#onDelayedInvoke() callback, or when it cancels a delayed execution.
 
- Protected Member Functions inherited from Action
 Action (Domain domain, long handle, Metaclass metaclass)
 Wraps a given native Action.
 

Static Protected Member Functions

static< Derived extends Action > ObjectRef< DerivedcreateDerived (Domain domain, String name, Metaclass metaclass)
 Creates a derived class instance.
 

Additional Inherited Members

- Public Attributes inherited from ActionBaseMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.ActionBase")
 Metaclass for ActionBase.
 
- Public Attributes inherited from ActionMetadata
DynamicPropertyType< Integer > DelayProperty
 The time in milliseconds after which Kanzi invokes the action.
 
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Action")
 Metaclass for Action.
 
- Public Attributes inherited from ForwardingActionMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.ForwardingAction")
 Metaclass for 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()

ForwardingAction ( Domain domain,
long handle,
Metaclass metaclass )
protected

Wraps a given native ForwardingAction.

Called by com.rightware.kanzi.KanziObject#connectObject(long) when connecting to a native action.

Parameters
domainUI Domain where this action belongs.
handleNative object that is backing this action.
metaclassMetaclass data for this action.

Member Function Documentation

◆ close()

void close ( )

Close the object, and release native resources.

Reimplemented from Action.

◆ createDerived()

static< Derived extends Action > ObjectRef< Derived > createDerived ( Domain domain,
String name,
Metaclass metaclass )
staticprotected

Creates a derived class instance.

Call this method as part of the create method for a derived class.

Parameters
domainUI Domain where this action belongs.
nameName of the action
metaclassMetaclass data of the action.
Returns
An ObjectRef that holds the created instance.

Reimplemented from Action.

◆ initialize()

void initialize ( )
protected

Initializes the ForwardingAction.

Reimplemented from Action.

◆ onAttach()

void onAttach ( )
protected

Callback called by Kanzi during attach.

Reimplemented from Action.

◆ onDelayedInvoke()

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.

Reimplemented from Action.

◆ onDetach()

void onDetach ( )
protected

Callback called by Kanzi during detach.

Reimplemented from Action.

◆ onInvoke()

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.

Reimplemented from Action.

◆ onPrepareDelayedInvoke()

void onPrepareDelayedInvoke ( )
protected

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

Use this to prepare for delayed execution.

Reimplemented from Action.

◆ onUnprepareDelayedInvoke()

void onUnprepareDelayedInvoke ( )
protected

Kanzi calls this callback when an action is invoked by trigger with delay, after com.rightware.kanzi.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.

Reimplemented from Action.

Member Data Documentation

◆ metaclass

final Metaclass metaclass
static
Initial value:
=
com.rightware.kanzi.metadata.ForwardingActionMetadata.metaclass

The Metaclass for the class.