javax.mail.event

Class TransportEvent


public class TransportEvent
extends MailEvent

A transport event.
Version:
1.4
Author:
Chris Burdess

Field Summary

static int
MESSAGE_DELIVERED
The message was successfully delivered to all recipients.
static int
MESSAGE_NOT_DELIVERED
The message was not sent.
static int
MESSAGE_PARTIALLY_DELIVERED
The message was successfully sent to some but not all of the recipients.
protected Address[]
invalid
protected Message
msg
protected int
type
The event type.
protected Address[]
validSent
protected Address[]
validUnsent

Constructor Summary

TransportEvent(Transport transport, int type, Address[] validSent, Address[] validUnsent, Address[] invalid, Message msg)
Constructor.

Method Summary

void
dispatch(Object listener)
Invokes the appropriate listener method.
Address[]
getInvalidAddresses()
Returns the addresses to which this message could not be sent.
Message
getMessage()
Returns the message.
int
getType()
Returns the type of this event.
Address[]
getValidSentAddresses()
Returns the addresses to which this message was delivered succesfully.
Address[]
getValidUnsentAddresses()
Returns the addresses that are valid but to which this message was not delivered.

Methods inherited from class javax.mail.event.MailEvent

dispatch

Field Details

MESSAGE_DELIVERED

public static final int MESSAGE_DELIVERED
The message was successfully delivered to all recipients.
Field Value:
1

MESSAGE_NOT_DELIVERED

public static final int MESSAGE_NOT_DELIVERED
The message was not sent.
Field Value:
2

MESSAGE_PARTIALLY_DELIVERED

public static final int MESSAGE_PARTIALLY_DELIVERED
The message was successfully sent to some but not all of the recipients.
Field Value:
3

invalid

protected Address[] invalid

msg

protected Message msg

type

protected int type
The event type.

validSent

protected Address[] validSent

validUnsent

protected Address[] validUnsent

Constructor Details

TransportEvent

public TransportEvent(Transport transport,
                      int type,
                      Address[] validSent,
                      Address[] validUnsent,
                      Address[] invalid,
                      Message msg)
Constructor.
Parameters:
type - the event type
validSent - the valid sent addresses
validUnsent - the valid unsent addresses
invalid - the invalid addresses
msg - the message

Method Details

dispatch

public void dispatch(Object listener)
Invokes the appropriate listener method.
Overrides:
dispatch in interface MailEvent

getInvalidAddresses

public Address[] getInvalidAddresses()
Returns the addresses to which this message could not be sent.

getMessage

public Message getMessage()
Returns the message.

getType

public int getType()
Returns the type of this event.

getValidSentAddresses

public Address[] getValidSentAddresses()
Returns the addresses to which this message was delivered succesfully.

getValidUnsentAddresses

public Address[] getValidUnsentAddresses()
Returns the addresses that are valid but to which this message was not delivered.

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved