public interface ICallableProgram
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 Elastic COBOL already implement the ICallableProgram interface.
parameterList
Modifier and Type | Method and Description |
---|---|
void |
call()
This is the entry point for the class when CALL'd with no parameters.
|
void |
call(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. |
void call() throws java.lang.Throwable
java.lang.Throwable
- for any CobolException or Java Exceptionvoid call(com.heirloomcomputing.ecs.exec.parameterList param) throws java.lang.Throwable
param
- - a parameterList of Variables to the programjava.lang.Throwable
- for any CobolException or Java Exceptionvoid cancel()
java.lang.String redirectCall()
It is strongly recommended to always return null.