ConnectionEvent (Java EE 5)

Java EE API


javax.mail.event Class ConnectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.mail.event.MailEvent
          extended by javax.mail.event.ConnectionEvent
All Implemented Interfaces:
Serializable

public class ConnectionEvent
extends MailEvent

Extends: java.util.EventObject > MailEvent

此类模拟 Connection 事件。
英文文档:

This class models Connection events.

Author:
John Mani
See Also:
Serialized Form

Field Summary
static int
static int
static int
protected  int
 
Fields inherited from class java.util.EventObject
 
Constructor Summary
 
Method Summary
 void
 int
 
Methods inherited from class java.util.EventObject
 
Methods inherited from class java.lang.Object
 

Field Detail

英文文档:

OPENED

public static final int OPENED
A connection was opened.

See Also:
Constant Field Values


英文文档:

DISCONNECTED

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

See Also:
Constant Field Values


英文文档:

CLOSED

public static final int CLOSED
A connection was closed.

See Also:
Constant Field Values


英文文档:

type

protected int type
The event type.

Constructor Detail

public ConnectionEvent(Object source, int type)
Constructor
source 源对象
英文文档:

ConnectionEvent

public ConnectionEvent(Object source,
                       int type)
Constructor

Parameters:
source - The source object

Method Detail

public int getType()
返回此事件的类型
return 类型
英文文档:

getType

public int getType()
Return the type of this event

Returns:
type

public void dispatch(Object listener)
调用相应的 ConnectionListener 方法
英文文档:

dispatch

public void dispatch(Object listener)
Invokes the appropriate ConnectionListener method

Specified by:
dispatch in class MailEvent


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!