/* */ package NET.worlds.network; /* */ /* */ import java.io.PrintStream; /* */ import java.util.Vector; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ class WaitList /* */ { /* 21 */ private Vector _waitList = new Vector(); /* */ private Object _parent; /* */ /* */ protected WaitList(Object parent) /* */ { /* 26 */ this._parent = parent; /* */ } /* */ /* */ protected synchronized void addWaiter(ConnectionWaiter cw) /* */ { /* 31 */ if ((Galaxy.getDebugLevel() & 0x4000) > 0) { /* 32 */ System.out.println(this._parent + ": waitForConnection(" + cw + ")"); /* */ } /* 34 */ if (this._waitList.indexOf(cw) < 0) /* 35 */ this._waitList.addElement(cw); /* */ } /* */ /* */ protected synchronized void abortWait(ConnectionWaiter cw) { /* 39 */ assert (this._waitList.indexOf(cw) != -1); /* 40 */ this._waitList.removeElement(cw); /* */ } /* */ /* */ protected synchronized void clear() { /* 44 */ this._waitList = new Vector(); /* */ } /* */ /* */ protected synchronized void notify(boolean connected) /* */ { /* 49 */ if (((Galaxy.getDebugLevel() & 0x4000) > 0) && /* 50 */ (this._waitList.size() > 0)) { /* 51 */ System.out.println(this._parent + ": notify(" + connected + ")"); /* */ } /* 53 */ for (int i = this._waitList.size() - 1; i >= 0; i--) { /* 54 */ ConnectionWaiter cw = (ConnectionWaiter)this._waitList.elementAt(i); /* */ /* 56 */ if ((Galaxy.getDebugLevel() & 0x4000) > 0) { /* 57 */ System.out.println("\tnotifying " + cw); /* */ } /* 59 */ cw.connectionCallback(this._parent, connected); /* 60 */ this._waitList.removeElementAt(i); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\WaitList.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */