Source of MessageManager.java


  1: // Fig. 24.24: MessageManager.java
  2: // MessageManger is an interface for objects capable of managing
  3: // communications with a message server.
  4: package com.deitel.messenger;

  6: public interface MessageManager 
  7: {      
  8:    // connect to message server and route incoming messages
  9:    // to given MessageListener
 10:    public void connect( MessageListener listener );
 11:    
 12:    // disconnect from message server and stop routing
 13:    // incoming messages to given MessageListener
 14:    public void disconnect( MessageListener listener );
 15:    
 16:    // send message to message server
 17:    public void sendMessage( String from, String message );  
 18: } // end interface MessageManager


 21: /**************************************************************************
 22:  * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and               *
 23:  * Pearson Education, Inc. All Rights Reserved.                           *
 24:  *                                                                        *
 25:  * DISCLAIMER: The authors and publisher of this book have used their     *
 26:  * best efforts in preparing the book. These efforts include the          *
 27:  * development, research, and testing of the theories and programs        *
 28:  * to determine their effectiveness. The authors and publisher make       *
 29:  * no warranty of any kind, expressed or implied, with regard to these    *
 30:  * programs or to the documentation contained in these books. The authors *
 31:  * and publisher shall not be liable in any event for incidental or       *
 32:  * consequential damages in connection with, or arising out of, the       *
 33:  * furnishing, performance, or use of these programs.                     *
 34:  *************************************************************************/