SK.gnome.dwarf.mail.smtp.proc
Class FailedDeliveryException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bySK.gnome.dwarf.mail.MailException
              extended bySK.gnome.dwarf.mail.smtp.proc.FailedDeliveryException
All Implemented Interfaces:
java.io.Serializable

public class FailedDeliveryException
extends MailException

This exception may be thrown to indicate a failed message delivery.

If a MailAgent throws this exception, the processed message will be automatically marked as not delivered with the given specific reason. If the DSN extension to SMTP is enabled, a delivery status notification will be automatically generated for the message by the server.

See Also:
Serialized Form

Constructor Summary
FailedDeliveryException(int type, java.lang.String code, java.lang.String status)
          Creates a new FailedDeliveryException.
FailedDeliveryException(int type, java.lang.String code, java.lang.String status, java.lang.Throwable cause)
          Creates a new FailedDeliveryException.
 
Method Summary
 java.lang.String getCode()
          Returns the numerical SMTP status code.
 java.lang.String getStatus()
          Returns the readable SMTP status message.
 int getType()
          Returns the delivery type.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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

FailedDeliveryException

public FailedDeliveryException(int type,
                               java.lang.String code,
                               java.lang.String status)
Creates a new FailedDeliveryException.

The type argument may be either the Recipient.FAILED or Recipient.REJECTED. In the latter case, an eventual DSN notification will not be sent to the message's sender.

Parameters:
type - the delivery type
code - the numerical SMTP status code in the form of X.Y.Z
status - the readable SMTP status message

FailedDeliveryException

public FailedDeliveryException(int type,
                               java.lang.String code,
                               java.lang.String status,
                               java.lang.Throwable cause)
Creates a new FailedDeliveryException.

The type argument may be either the Recipient.FAILED or Recipient.REJECTED. In the latter case, an eventual DSN notification will not be sent to the message's sender.

Parameters:
type - the delivery type
code - the numerical SMTP status code in the form of X.Y.Z
status - the readable SMTP status message
cause - the root cause
Method Detail

getType

public int getType()
Returns the delivery type.

Returns:
the delivery type

getCode

public java.lang.String getCode()
Returns the numerical SMTP status code.

Returns:
the status code

getStatus

public java.lang.String getStatus()
Returns the readable SMTP status message.

Returns:
the status message


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.