Sets the Executable currently under execution. At a given time there can be only one executable set. After the executable has finished its execution this value should be set back to null. An attempt to set the executable while this value is not null will result in the method call waiting unt
(gate.Executable executable)
| 731 | * waiting until the old executable is set to null. |
| 732 | */ |
| 733 | public synchronized static void setExecutable(gate.Executable executable) { |
| 734 | if(executable == null) |
| 735 | currentExecutable = executable; |
| 736 | else { |
| 737 | while(getExecutable() != null) { |
| 738 | try { |
| 739 | Thread.sleep(200); |
| 740 | } |
| 741 | catch(InterruptedException ie) { |
| 742 | throw new GateRuntimeException(ie.toString()); |
| 743 | } |
| 744 | } |
| 745 | currentExecutable = executable; |
| 746 | } |
| 747 | } // setExecutable |
| 748 | |
| 749 | /** |
| 750 | * Returns the curently set executable. |
no test coverage detected