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