javax.mail.event

Class ConnectionEvent


public class ConnectionEvent
extends MailEvent

This class models Connection events.

Field Summary

static int
CLOSED
A connection was closed.
static int
DISCONNECTED
A connection was disconnected(not currently used).
static int
OPENED
A connection was opened.
protected int
type
The event type.

Constructor Summary

ConnectionEvent(Object source, int type)
Constructor

Method Summary

void
dispatch(Object listener)
Invokes the appropriate ConnectionListener method
int
getType()
Return the type of this event

Methods inherited from class javax.mail.event.MailEvent

dispatch

Field Details

CLOSED

public static final int CLOSED
A connection was closed.

Field Value:
3


DISCONNECTED

public static final int DISCONNECTED
A connection was disconnected(not currently used).

Field Value:
2


OPENED

public static final int OPENED
A connection was opened.

Field Value:
1


type

protected int type
The event type.

Constructor Details

ConnectionEvent

public ConnectionEvent(Object source,
                       int type)
Constructor

Parameters:
source - The source object

Method Details

dispatch

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


getType

public int getType()
Return the type of this event