inria.meije.rc.sugarcubes
Interface JavaCallback

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
JavaCallbackNothing

public interface JavaCallback
extends java.io.Serializable

While executing, SugarCubes programs often needs to operate some modifications to the state of some Java objects on which it is intend to operate. Those data processing operations in SugarCubes are handled by atomic operations.
This interface needs to be implemented by the programmer to implement Java actions in its reactive program triggered by the new occurrence of an event. A JavaCallback object is handled by a reactive Callback instruction.

See Also:
SC.callback(inria.meije.rc.sugarcubes.JavaIdentifierExpression, inria.meije.rc.sugarcubes.JavaCallback)

Method Summary
 void execute(java.lang.Object self, LocalVariables vars, ReactiveEngine engine, Argument[] args)
          This method needs to be implemented by the SugarCubes programmer to perform atomic actions on Java objects, when a new valued occurrence of an event is handled by a reactive callback.
 

Method Detail

execute

public void execute(java.lang.Object self,
                    LocalVariables vars,
                    ReactiveEngine engine,
                    Argument[] args)
This method needs to be implemented by the SugarCubes programmer to perform atomic actions on Java objects, when a new valued occurrence of an event is handled by a reactive callback.
The first argument passed to this method when the atomic callback need to be executed by the reactive program is the java object to which the reactive program is bound. This is probably the most important argument which allows one to get a first reference to an object in the Java environment of a reactive program.
The second argument is a reference to the linked list of local variables defined in the reactive program.
The third argument is a reference to the reactive execution environment allowing special manipulations such as: Finally, the last argument is the array of Argument objects, which is the set of values associated to the occurrence of the event, which as triggered the reaction of the Callback.
See Also:
Cube