org.apache.geronimo.javamail.transport.smtp
Class SMTPConnection.SendStatus

java.lang.Object
  extended by org.apache.geronimo.javamail.transport.smtp.SMTPConnection.SendStatus
Enclosing class:
SMTPConnection

public static class SMTPConnection.SendStatus
extends Object

Simple holder class for the address/send status duple, as we can have mixed success for a set of addresses and a message


Field Summary
static int GENERAL_ERROR
           
static int INVALID_ADDRESS
           
static int SEND_FAILURE
           
static int SUCCESS
           
 
Constructor Summary
SMTPConnection.SendStatus(int s, InternetAddress a, String c, org.apache.geronimo.javamail.transport.smtp.SMTPReply r)
          Constructor for a SendStatus item.
 
Method Summary
 InternetAddress getAddress()
          Retrieve the InternetAddress object associated with this send operation.
 String getCommand()
          Get the command string sent for this send operation.
 MessagingException getException(boolean reportSuccess)
          Get an exception object associated with this send operation.
 org.apache.geronimo.javamail.transport.smtp.SMTPReply getReply()
          Retrieve the reply information associated with this send operati
 int getStatus()
          Get the status information for this item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values

INVALID_ADDRESS

public static final int INVALID_ADDRESS
See Also:
Constant Field Values

SEND_FAILURE

public static final int SEND_FAILURE
See Also:
Constant Field Values

GENERAL_ERROR

public static final int GENERAL_ERROR
See Also:
Constant Field Values
Constructor Detail

SMTPConnection.SendStatus

public SMTPConnection.SendStatus(int s,
                                 InternetAddress a,
                                 String c,
                                 org.apache.geronimo.javamail.transport.smtp.SMTPReply r)
Constructor for a SendStatus item.

Parameters:
s - The status type.
a - The address this is the status for.
c - The command string associated with this status.
r - The reply information from the server.
Method Detail

getStatus

public int getStatus()
Get the status information for this item.

Returns:
The current status code.

getAddress

public InternetAddress getAddress()
Retrieve the InternetAddress object associated with this send operation.

Returns:
The associated address object.

getReply

public org.apache.geronimo.javamail.transport.smtp.SMTPReply getReply()
Retrieve the reply information associated with this send operati

Returns:
The SMTPReply object received for the operation.

getCommand

public String getCommand()
Get the command string sent for this send operation.

Returns:
The command string for the MAIL TO command sent to the server.

getException

public MessagingException getException(boolean reportSuccess)
Get an exception object associated with this send operation. There is a mechanism for reporting send success via a send operation, so this will be either a success or failure exception.

Parameters:
reportSuccess - Indicates if we want success operations too.
Returns:
A newly constructed exception object.


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.