com.icegreen.greenmail.smtp
Class SmtpManager.WaitObject

java.lang.Object
  extended by com.icegreen.greenmail.smtp.SmtpManager.WaitObject
Enclosing class:
SmtpManager

public static class SmtpManager.WaitObject
extends Object

This Object is used by a thread to wait until a number of emails have arrived. (for example Server's waitForIncomingEmail method) Every time an email has arrived, the method emailReceived() must be called. The notify() or notifyALL() methods should not be called on this object unless you want to notify waiting threads even if not all the required emails have arrived.


Constructor Summary
SmtpManager.WaitObject(int emailCount)
           
 
Method Summary
 void emailReceived()
           
 int getEmailCount()
           
 boolean isArrived()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmtpManager.WaitObject

public SmtpManager.WaitObject(int emailCount)
Method Detail

getEmailCount

public int getEmailCount()

isArrived

public boolean isArrived()

emailReceived

public void emailReceived()