FileDocCategorySizeDatePackage
ConnectionEvent.javaAPI DocGlassfish v2 API3258Mon May 14 15:28:48 BST 2007javax.mail.event

ConnectionEvent

public class ConnectionEvent extends MailEvent
This class models Connection events.
author
John Mani

Fields Summary
public static final int
OPENED
A connection was opened.
public static final int
DISCONNECTED
A connection was disconnected (not currently used).
public static final int
CLOSED
A connection was closed.
protected int
type
The event type.
private static final long
serialVersionUID
Constructors Summary
public ConnectionEvent(Object source, int type)
Constructor

param
source The source object


                
         
	super(source);
	this.type = type;
    
Methods Summary
public voiddispatch(java.lang.Object listener)
Invokes the appropriate ConnectionListener method

	if (type == OPENED)
	    ((ConnectionListener)listener).opened(this);
	else if (type == DISCONNECTED)
	    ((ConnectionListener)listener).disconnected(this);
	else if (type == CLOSED)
	    ((ConnectionListener)listener).closed(this);
    
public intgetType()
Return the type of this event

return
type

	return type;