|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsav.z.Commutator
Permits to interrupt a current Script execution.
The example stops printing that a few Sessions do contemporary.
Commutator comm = new Commutator();
for (int i = 0; i < 5; ++i) {
CommutatorDemo ss = new CommutatorDemo(text, i);
ss.setCommutator(comm);
new Thread(ss).start();
}
Thread.sleep(1000);
comm.setOff(true);
...
Session.getCommutator(),
Session.setCommutator(sav.z.Commutator)| Constructor Summary | |
Commutator()
Constructs a Commutator object. |
|
| Method Summary | |
boolean |
isOff()
Returns true if Commutator is switched off. |
void |
setOff(boolean yes)
Switches a Commutator. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Commutator()
| Method Detail |
public void setOff(boolean yes)
yes - true if need switch off Commutator,
false if need switch onpublic boolean isOff()
true if Commutator is switched off.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||