public interface ChaimsCompliantLocal { // This interface must be implemented by any java class that wants to be a // local megamodule. Based on the entries in the repository (name of the class, // JAVA_LOCAL for protocol), the class is loaded by the CSRT, and prior to the // invocation of the SETUP method, an instance of the class is created. // ChaimsCompliantLocal is very similar to ChaimsCompliantObject, used for RMI- // megamodules, yet there are some differences. // Each megaprogram gets its own instance of a local Java megamodule. Therefore, // the parameter clientID is not necessary. In contrast to remote megamodules, local // Java megamodules are never called by more than one client/megaprogram. public void SETUP (); // Prepare the megamodule for all the other calls. public long INVOKE (String methodName, ChaimsAttrValContainer cont); // IN methodName: name of the method to be invoked. Valid method names are given by // the repository. // IN cont: list of name-value pairs that are the invocation-specific parameters for // this invocation. Valid names are given by the repository. // OUT long: callID by which this invocation can be referenced later on until it // gets terminated public ChaimsInvokStatus EXAMINE(long callID); // IN callID: reference of the invocation to be investigated // OUT ChaimsInvokStatus: status of this invocation public void ESTIMATE(String methodName, ChaimsAttrValContainer cont) ; // IN methodName: name of the method for which an estimate is asked for // IN, OUT cont: list of name-value pairs containing the characteristics asked for. // Valid names so far are "time", "fee" and "datavolume". Units // and default-values: see overview protocols. public void GETPARAM(ChaimsAttrValContainer cont); // IN, OUT cont: list of name-value pairs. For input the values are empty, and the names // contain the names of parameters and global variables available in this // megamodule (for valid names see repository). For output, the values then contain // the current settings for the calling megaprogram. If no client-specific settings // have been made yet, default values are returned. public void EXTRACT(long callID, ChaimsAttrValContainer cont); // IN callID: reference of the invocation from which we want the results // IN, OUT cont: list of name-value pairs. For input, the values are empty and the names // tell the megamodule which results are requested. For output, the values are then // filled with the appropriate results. If the invocation has not yet been // done, the values may contain garbage. public void SETPARAM(ChaimsAttrValContainer cont); // IN cont: list of name-value pairs containing the parameters of global variables that // should be specified megamodule-specific. This specification overrides general // default-settings and will be used by INVOKE's whenever no invocation specific // values are given. public void TERMINATE(long callID) ; // IN callID: reference of the invocation that is no longer needed. public void TERMINATEALL (); // All invocations can be aborted. The megamodule can no longer be accessed unless a // a new SETUP call is issued. } /* The following classes are partially described here in order to inhance readability of the interface ChaimsCompliantLocal. public class ChaimsInvokStatus implements Serializable { public static final int DONE; public static final int NOT_DONE; public static final int ERROR; } public class ChaimsAttrValContainer implements Serializable { private Vector container; public ChaimsAttrValContainer (ChaimsAttrValObject pair); public ChaimsAttrValContainer (); public int getNumAttrValObjects(); public void addAttrValObject(ChaimsAttrValObject newPair); public ChaimsAttrValObject getFirstAttrValObject(); public ChaimsAttrValObject getAttrValObject(int i); } public class ChaimsAttrValObject implements Serializable { private String name; private byte[] val; public ChaimsAttrValObject(String name, byte[] val); public ChaimsAttrValObject(String name); public void setName(String name); public void setVal(byte[] val); public String getName(); public byte[] getVal(); } */