FileDocCategorySizeDatePackage
ConnectionEvent.javaAPI DocJavaMail 1.4.33209Tue Nov 17 10:38:12 GMT 2009javax.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;