Use of addConnectionListener(listener)

  2 posts   Feedicon  
Replies: 1 - Last Post: October 24, 2010 23:48
by: shannon
showing 1 - 2 of 2
 
Posted: October 24, 2010 10:06 by Rajiv
Can anyone explain me the use of and the advantages of using addConnectionListener(listener) in a imaps store before the store.connect() method and in smtp before transport.connect() method.
 
Posted: October 24, 2010 23:48 by shannon
Whether you see an advantage in using connection listeners depends on your application architecture.
If your application is pretty much straight line synchronous code, you probably won't see an
advantage in listeners; you can get all the same information from exceptions thrown by methods.
If your application is more event driven, you might find the events sent to listeners helpful.
Replies: 1 - Last Post: October 24, 2010 23:48
by: shannon
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close