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.msn.message;
20  
21  import net.sf.dexterim.msn.MsnConnection;
22  
23  
24  /***
25   *@author     christoph
26   */
27  public interface MsnMessage {
28    /***
29     *  Adds a feature to the CharBlock attribute of the MsnMessage object
30     *
31     *@param  charBlock                                                     The
32     *      feature to be added to the CharBlock attribute
33     *@return
34     *      Description of the Return Value
35     *@exception  net.sf.dexterim.msn.engine.MessageFormatException
36     *      Description of the Exception
37     */
38    public MsnMessage addCharBlock(char[] charBlock)
39      throws net.sf.dexterim.msn.message.MessageFormatException;
40  
41    /***
42     *  Adds a Received Line to a Message. Return an instance of MsnMessage
43     *
44     *@param  line                                                          The
45     *      feature to be added to the Line attribute
46     *@return
47     *      Description of the Return Value
48     *@exception  net.sf.dexterim.msn.engine.MessageFormatException
49     *      Description of the Exception
50     */
51    public MsnMessage addLine(String line)
52      throws net.sf.dexterim.msn.message.MessageFormatException;
53  
54    /***
55     *  Gets the requiredByteInput attribute of the MsnMessage object
56     *
57     *@return    The requiredByteInput value
58     */
59    public int getRequiredByteInput();
60  
61    /***
62     *  Return true if MsnMessage does not require any further input. Is
63     *  Completed will be called <b>after</b> the first addLine was called!
64     *
65     *@return    The completed value
66     */
67    public boolean isCompleted();
68  
69    /***
70     *  Gets the multipartMessage attribute of the MsnMessage object
71     *
72     *@return    The multipartMessage value
73     */
74    public boolean isMultipartMessage();
75    
76    /***
77     * Double Dispatching Messages
78     * @param connection
79     */
80    public void process(MsnConnection connection);
81  }