Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: plugins/Messenger/PluginChain.java


1   /*
2   This file is part of DeXter - Java Internet Communication Solution
3   Copyright (c) 2002 Tobias Riemer
4   
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9   
10  This library 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 Lesser General Public
16  License 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  
20  /*
21   * PluginChain.java
22   *
23   * Created on October 22, 2002, 5:35 PM
24   */
25  
26  package plugins.Messenger;
27  
28  /** PluginChain acts as a Proxy between the ChatFrame, Plugins and Conversation.
29   * PluginChain manages all plugins that are associated with a Conversation. PluginChain
30   * is attached to ChatFrame and Conversation. It intercepts Messages send by the user and
31   * fowards the Message to each MessengerPlugin. If a Messenger plugin decides to consume a
32   * message a null message is returned. The message will not be forwarded to any other plugins or to
33   * Conversation.
34   * If no null messages are returned by MessengerPlugins PluginChain forwards messages to Conversation
35   * which is responsible for the "physical" send operation via network. 
36   *
37   * @author  Christoph Walcher
38   */
39  public interface PluginChain extends Conversation {
40      
41      /** Adds a MessengerPlugins to the chain
42       *
43       */
44      public void addPlugin(MessengerPlugin plugin);
45      
46      /** Returns all MessengerPlugins currently in this chain
47       * @return A List of MessengerPlugins
48       */
49      public java.util.List getPlugins();
50  }