package wrapper; /**Defines the callback functions to be used by the wrapped computational (legacy) code for getting parameter values, reporting progress, and storing results. When getting a parameter value with getParam, the value must be cast to its type (e.g. String or Gentype) for processing.*/ public interface CPAMWrapperCallbacks { /**Reads a parameter value. @throws ParameterNameException the name of the parameter is unknown*/ public Object getParam(String name); /**Checks if a specific parameter exists. Returns true if name is the name of a parameter usable for this invocation.*/ public boolean containsParam(String name); /**Stores results. The results can be progressive or final. For final results resultIsFinal must be true, yet the value for accuracy needs not to be set ( 0 or 100 are good defaults for finished results). For progressive results, accuracy must be set and resultIsFinal must be false. Accuracy normally has a value between 0 and 100, unless specified differently for this parameter in the CHAIMS repository. @throws ParameterNameException the name of the parameter is unknown*/ public void updateParam(String name, Object value, boolean resultIsFinal, float accuracy); /**Updates invocation progress. This method should only be called if the computational code offers progress information. If progress information is available, progress is normally a value between 1-100 unless otherwise specified in the CHAIMS repository. Progress indicates the progress of this invocation, normally indicating the progress in the amount of execution time done in respect to the overall execution time of the method. */ public void updateInvocationProgress(float progress); /**Returns the invocation Id for this invocation object. Every invocation object has a unique invocation id that is used internally as well as by clients to identify this invocation. This method is an easy way to get unique invocation identifiers in case the computational code needs some.*/ public Integer getInvocationId(); }