Enabling Smalltalk objects
Enabling a set of Smalltalk objects for use with SST's RMI Support depends on how the objects are to be used. All objects, regardless of how they interact with Java must define their corresponding Java class using:
sstRmiClassName
Answers the name of the Java class corresponding to the class of the receiver (for example, java.lang.String). This is required if the receiver is to be passed to or from Java by value or by reference (using serialization or stubs).
The classes named in such methods must be defined in the Java type repository for the current application context. (See Java type information.) Several Smalltalk classes can map to the same Java class but one Java class can only be mapped to one Smalltalk class.
Objects which will be passed by value (serialized) must define the following method to answer true.
sstIsRmiSerializable
Answers true if the receiver is to be considered serializable according to the specification in Java. In general, this means that the object is passed by value rather than by reference. Answering true requires that there be a Java class mapping specified in the relevant JavaTypeRepository and that that mapping have the correct serialization ID and definitions for the object's slots or types.
If an object should be passed as an array it should implement the following method to return true.
sstIsArray
Answers true if the receiver is to be considered to be an Array according to the specification in Java. In general, this means that the object is passed by value rather than by reference.
Serialized objects must also provide either instance variable accessors that correspond to their variable names (for example, a variable named foo must have the accessors foo and foo:) or specify getter and setter selectors in the Java type repository specification as outlined in Java type information.
Objects being represented remotely by stubs (passed by reference) must implement the following method to answer true.
sstIsRmiRemotable
Answers true if the receiver is to be considered to be "remotable" according to the specification in Java. In general this means that the object is passed by reference rather than by value. Answering true requires that there be a Java class mapping specified in the relevant JavaTypeRepository and that that mapping have the correct hash values for the class' corresponding stub and skeleton. The mapping must also specify any methods which are to be invoked or serviced.
Objects passed to SST as stubs (remote references from Smalltalk to Java) are represented in Smalltalk using generic stubs. That is, structurally all stubs look the same. It is only the remote object's class information and object identifier which varies. For this reason, the Smalltalk type definitions for all remoteable Java types should specify SstRmiGenericStub as their Smalltalk implementation class.
Last modified date: 01/29/2015