Top Description Fields Constructors Methods
jakarta.mail.event

public Class ConnectionEvent

extends MailEvent
Class Inheritance

This class models Connection events.
Author
John Mani

Field Summary

Modifier and TypeField and Description
public static final int
CLOSED

A connection was closed.

public static final int
DISCONNECTED

A connection was disconnected (not currently used).

public static final int
OPENED

A connection was opened.

private static final long
protected int
type

The event type.

Constructor Summary

AccessConstructor and Description
public
ConnectionEvent(Object
The source object
source
,
int
the event type
type
)

Construct a ConnectionEvent.

Method Summary

Modifier and TypeMethod and Description
public void
dispatch(Object
the listener to invoke on
listener
)

Implements abstract jakarta.mail.event.MailEvent.dispatch.

Invokes the appropriate ConnectionListener method

public int

Returns:

type
getType
()

Return the type of this event

Field Detail

CLOSEDback to summary
public static final int CLOSED

A connection was closed.

DISCONNECTEDback to summary
public static final int DISCONNECTED

A connection was disconnected (not currently used).

OPENEDback to summary
public static final int OPENED

A connection was opened.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.mail.event.MailEvent.serialVersionUID.

typeback to summary
protected int type

The event type.

Constructor Detail

ConnectionEventback to summary
public ConnectionEvent(Object source, int type)

Construct a ConnectionEvent.

Parameters
source:Object

The source object

type:int

the event type

Method Detail

dispatchback to summary
public void dispatch(Object listener)

Implements abstract jakarta.mail.event.MailEvent.dispatch.

Invokes the appropriate ConnectionListener method

Parameters
listener:Object

Doc from jakarta.mail.event.MailEvent.dispatch.

the listener to invoke on

Annotations
@Override
getTypeback to summary
public int getType()

Return the type of this event

Returns:int

type