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 MimeMessage implements net.sf.dexterim.msn.message.MsnMessage {
25    private int requiredByteInput;
26  
27    /***
28     *  Constructor for the MimeMessage object
29     */
30    public MimeMessage() {
31      requiredByteInput = -1;
32    }
33  
34    /***
35     *  Gets the multipartMessage attribute of the MimeMessage object
36     *
37     *@return    The multipartMessage value
38     */
39    public boolean isMultipartMessage() {
40      return true;
41    }
42  
43    /***
44     *  Return true if MsnMessage does not require any further input. Is
45     *  Completed will be called <b>after</b> the first addLine was called!
46     *
47     *@return    The completed value
48     */
49    public boolean isCompleted() {
50      return true;
51    }
52  
53    /***
54     *  Gets the requiredByteInput attribute of the MimeMessage object
55     *
56     *@return    The requiredByteInput value
57     */
58    public int getRequiredByteInput() {
59      return requiredByteInput;
60    }
61  
62    /***
63     *  Description of the Method
64     *
65     *@param  account
66     *      Description of the Parameter
67     *@param  nick
68     *      Description of the Parameter
69     *@param  lineList
70     *      Description of the Parameter
71     *@exception  net.sf.dexterim.msn.engine.MessageFormatException
72     *      Description of the Exception
73     */
74    public abstract void processMessage(
75      String account,
76      String nick,
77      java.util.List lineList)
78      throws net.sf.dexterim.msn.message.MessageFormatException;
79  
80    /***
81     *  Setter for property requiredByteInput.
82     *
83     *@param  requiredByteInput  New value of property requiredByteInput.
84     */
85    public void setRequiredByteInput(int requiredByteInput) {
86      this.requiredByteInput = requiredByteInput;
87    }
88  
89    /***
90     *  Adds a Received Line to a Message. Return an instance of MsnMessage
91     *
92     *@param  line                                                          The
93     *      feature to be added to the Line attribute
94     *@return
95     *      Description of the Return Value
96     *@exception  net.sf.dexterim.msn.engine.MessageFormatException
97     *      Description of the Exception
98     */
99    public net.sf.dexterim.msn.message.MsnMessage addLine(String line) 
100     throws MessageFormatException {
101     throw new UnsupportedOperationException();
102   }
103 
104   /***
105    *  Adds a feature to the CharBlock attribute of the MimeMessage object
106    *
107    *@param  charBlock                                                     The
108    *      feature to be added to the CharBlock attribute
109    *@return
110    *      Description of the Return Value
111    *@exception  net.sf.dexterim.msn.engine.MessageFormatException
112    *      Description of the Exception
113    */
114   public net.sf.dexterim.msn.message.MsnMessage addCharBlock(char[] charBlock) 
115     throws MessageFormatException {
116     throw new UnsupportedOperationException();
117   }
118 }