net.sf.jml.message
Class MsnMimeMessage
java.lang.Object
net.sf.jml.message.MsnMimeMessage
- Direct Known Subclasses:
- MsnEmailActivityMessage, MsnEmailInitEmailData, MsnEmailInitMessage, MsnEmailNotifyMessage, MsnEmoticonMessage, MsnInstantMessage, MsnP2PMessage, MsnPropMessage, MsnSystemMessage, MsnUnknownMessage
public abstract class MsnMimeMessage
- extends Object
MIME Message. based on protocol message: OutgoingMSG and IncomingMSG.
- Author:
- Roger Chen
headers
protected final StringHolder headers
MsnMimeMessage
public MsnMimeMessage()
getHeaders
public final StringHolder getHeaders()
getContentType
public final String getContentType()
setContentType
protected void setContentType(String contentType)
getMimeVersion
public final String getMimeVersion()
setMimeVersion
protected void setMimeVersion(String mimeVersion)
getCharset
protected final String getCharset()
toString
public String toString()
- Overrides:
toString
in class Object
toOutgoingMsg
public OutgoingMSG[] toOutgoingMsg(MsnProtocol protocol)
- Generate OutgoingMSGs.
- Parameters:
protocol
- used MsnProtocol
- Returns:
- generated OutgoingMSGs. A MsnMimeMessage may generate multi OutgoingMSGs.
parseMessage
protected void parseMessage(byte[] content)
- Parse content from IncomingMSG's chunk data.
- Parameters:
content
- IncomingMSG's chunk data
parseBuffer
protected void parseBuffer(ByteBuffer buffer)
messageReceived
protected void messageReceived(MsnSession session,
MsnContact contact)
- The message have received, invoked by dispatch thread
- Parameters:
session
- the MsnSession which received the messagecontact
- the user who sent this message