接口 javax.mail.event.ConnectionListener
的使用

使用 ConnectionListener 的软件包
javax.mail The JavaMailTM API provides classes that model a mail system. 
javax.mail.event Listeners and events for the JavaMail API. 
 

javax.mailConnectionListener 的使用
 

参数类型为 ConnectionListenerjavax.mail 中的方法
 void Service.addConnectionListener(ConnectionListener l)
          Add a listener for Connection events on this service.
 void Folder.addConnectionListener(ConnectionListener l)
          Add a listener for Connection events on this Folder.
 void Service.removeConnectionListener(ConnectionListener l)
          Remove a Connection event listener.
 void Folder.removeConnectionListener(ConnectionListener l)
          Remove a Connection event listener.
 

javax.mail.eventConnectionListener 的使用
 

实现 ConnectionListenerjavax.mail.event 中的类
 class ConnectionAdapter
          The adapter which receives connection events.
 



Copyright © 2013. All Rights Reserved.