test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetBasicInstantMessaging.java
/**
         * Blocks until at least one event is received or until waitFor
         * miliseconds pass (whicever happens first).
         *
         * @param waitFor the number of miliseconds that we should be waiting
         * for an event before simply bailing out.
         */
Blocks until at least one event is received or until waitFor
miliseconds pass (whicever happens first).

@param waitFor the number of miliseconds that we should be waiting
for an event before simply bailing out.
Blocks until at least one event is received or until waitFor miliseconds pass ( whicever happens first ) . @param waitFor the number of miliseconds that we should be waiting for an event before simply bailing out .
public void waitForEvent(long waitFor)
        {
            synchronized (this)
            {
                if (collectedMessageInfo.size() > 0)
                {
                    logger.trace("evt already received. "
                                 + collectedMessageInfo);
                    return;
                }
                try
                {
                    wait(waitFor);
                }
                catch (InterruptedException ex)
                {
                    logger.debug(
                        "Interrupted while waiting for a subscription evt", ex);
                }
            }
        }
public void waitForEvent ( long waitFor ) { synchronized ( this ) { if ( collectedMessageInfo . size ( ) > 0 ) { logger . trace ( "evt already received. " + collectedMessageInfo ) ; return ; } try { wait ( waitFor ) ; } catch ( InterruptedException ex ) { logger . debug ( "Interrupted while waiting for a subscription evt" , ex ) ; } } }
Blocks until at least one event is received or until waitFor
 miliseconds pass (whicever happens first).
Blocks until at least one event is received or until waitFor miliseconds pass ( whicever happens first ) .