inria.meije.rc.sugarcubes
Interface Cube

All Superinterfaces:
java.io.Serializable

public interface Cube
extends java.io.Serializable

The Cube interface allows the user to handle Cubes in any atomic operation.
A Cube is reactive object that encapsulates in the same entity a Java object and a reactive program. At some points in the execution, a part of a reactive program needs interactions with the associated Java object. Such interactions are called atomic operations in SugarCubes. An atomic operation can be either:

When executed, java code of such atomic operations can access to a Cube and especially the java object to which it is bound, using this interface.

Note: A SugarCubes programmer should never implements that interface in any of its own objects, as it is definitely not sufficient to implement a Cube. The purpose of this interface is only to give a minimal type to handle Cube in atomic operations.


Method Summary
 java.lang.Object getJavaObject()
          This method gives an access to the associated Java object of a cube in any atomic operation.
 java.lang.String getName()
          It returns the name of the Cube.
 Cube getSuperCube()
          This method returns the cube that encapsulates the current Cube on which this call is made.
 

Method Detail

getJavaObject

public java.lang.Object getJavaObject()
This method gives an access to the associated Java object of a cube in any atomic operation. The object returned by this method should be cast to the appropriate type in order before to be use.

getName

public java.lang.String getName()
It returns the name of the Cube. This name allows the programmer to identify and reference a Cube in the system.

getSuperCube

public Cube getSuperCube()
This method returns the cube that encapsulates the current Cube on which this call is made. The ultimate Cube accessible, that way in an atomic operation, is the reactive machine itself.
Note : Cubes can be nested, and one can access to the upper cube in the hierarchy by calling getSuperCube.