View Javadoc
1   //////////////////////////////////////////////////////////////////////////////
2   // dexterIM - Instant Messaging Framework
3   // Copyright (C) 2003  Christoph Walcher
4   //
5   // This program is free software; you can redistribute it and/or modify
6   // it under the terms of the GNU General Public License as published by
7   // the Free Software Foundation; either version 2 of the License, or
8   // (at your option) any later version.
9   //
10  // This program is distributed in the hope that it will be useful,
11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  // GNU General Public License for more details.
14  //
15  // You should have received a copy of the GNU General Public License
16  // along with this program; if not, write to the Free Software
17  // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  //////////////////////////////////////////////////////////////////////////////
19  package net.sf.dexterim.core;
20  
21  import net.sf.dexterim.core.event.ConversationListener;
22  
23  /*** Represents a Conversation with one or more Contacts
24   * @author Christoph Walcher
25   */
26  public interface Conversation {
27    /*** Add <B>contact</B> to the conversation.
28     * @param contact The Contact object that should join the Conversation
29     */
30    void join(Contact contact);
31  
32    /*** Connects the Conversation object to the messenger network
33     */
34    void open();
35  
36    /*** Sends a Message in encoded in a String over the implements network. It's
37     * in the responsibility of the implementing Class to encode the String 
38     * message
39     */
40    void sendMessage(String message);
41  
42    /*** Ends the Conversation and frees unused Resources
43     * 
44     */
45    void close();
46  
47    /***
48     * @param listener
49     */
50    void addConversationListener(ConversationListener listener);
51  
52    /***
53     * @param listener
54     */
55    void removeConversationListener(ConversationListener listener);
56  }