public interface ICallable
Example Java:
public class myprogram implements ICallableProgram {
public void call() { System.out.println("Called with no params."); }
public void call(parameterList param) { System.out.println("Called with params."); }
public void cancel() { System.out.println("Cancelled."); }
public String redirectCall() { return null; }
...
}
Example COBOL:
CALL "myprogram".
CALL "myprogram" USING VALUE-1 VALUE-2 ... VALUE-N.
CANCEL "myprogram".
Note that all COBOL program compiled with PERCobol already implement the ICallableProgram interface.
parameterList| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
call(com.heirloomcomputing.ecs.exec.Context parentContext)
This is the entry point for the class when CALL'd with no parameters.
|
java.lang.Object |
call(com.heirloomcomputing.ecs.exec.Context parentContext,
com.heirloomcomputing.ecs.exec.parameterList param)
This is the entry point for the class when CALL'd with parameters.
|
void |
cancel()
This method should reinitialize the class to its initial state.
This is the method that is called whenever COBOL CANCEL's a program. Never throw an exception from this method. |
java.lang.String |
redirectCall()
redirectCall reroutes calls to this class to instead go to another class.
Return null if you desire normal behavior for the class. |
java.lang.Object call(com.heirloomcomputing.ecs.exec.Context parentContext)
throws java.lang.Throwable
java.lang.Throwablejava.lang.Object call(com.heirloomcomputing.ecs.exec.Context parentContext,
com.heirloomcomputing.ecs.exec.parameterList param)
throws java.lang.Throwable
java.lang.ThrowableparameterListvoid cancel()
java.lang.String redirectCall()
It is strongly recommended to always return null.