Class PostponeException

  • All Implemented Interfaces:
    java.io.Serializable

    public class PostponeException
    extends Exception
    Indicates that the specific host, must not be connected at this time, because there are too many open connections to it or it recently failed. It can also indicate that all hosts of a domain has such problems. In such cases the transmission must be postponed. Note that this does not count as a retry in SMTP terms, because the connection have not even attempted.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PostponeException​(int recommendedDelay, EnhancedStatus enhancedStatus, String message)
      Construct a new exception without a remote MTA, which must be set later.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EnhancedStatus getEnhancedStatus()
      Returns the enhanced status which should be reported if no more postponing is possible.
      int getRecommendedDelay()
      Returns the recommended delay until the host will likely become available, in seconds.
      MtaAddress getRemoteMta()
      Returns the remote MTA for which the connection must be postponed.
      void setRemoteMta​(MtaAddress remoteMta)
      Sets the remote MTA which will be returned by getRemoteMta()
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PostponeException

        public PostponeException​(int recommendedDelay,
                                 EnhancedStatus enhancedStatus,
                                 String message)
        Construct a new exception without a remote MTA, which must be set later.
    • Method Detail

      • getRecommendedDelay

        public int getRecommendedDelay()
        Returns the recommended delay until the host will likely become available, in seconds.
      • getEnhancedStatus

        public EnhancedStatus getEnhancedStatus()
        Returns the enhanced status which should be reported if no more postponing is possible.
      • setRemoteMta

        public void setRemoteMta​(MtaAddress remoteMta)
        Sets the remote MTA which will be returned by getRemoteMta()
      • getRemoteMta

        public MtaAddress getRemoteMta()
        Returns the remote MTA for which the connection must be postponed.