pl.mn.communicator
Class AbstractMessage

java.lang.Object
  extended by pl.mn.communicator.AbstractMessage
All Implemented Interfaces:
IMessage
Direct Known Subclasses:
IncomingMessage, OutgoingMessage

public abstract class AbstractMessage
extends java.lang.Object
implements IMessage

An abstract implementation of IMessage that is common for incoming and outgoing messages.

Version:
$Id: AbstractMessage.java,v 1.1 2005/11/05 23:34:52 winnetou25 Exp $
Author:
Marcin Naglik

Field Summary
protected  java.lang.String m_messageBody
          The body of the message
protected  MessageClass m_messageClass
          The message class associated with this message
protected  int m_messageID
           
protected  int m_recipientUin
          Uin of the Gadu-Gadu user
 
Constructor Summary
protected AbstractMessage(int recepientUin, java.lang.String messageBody, MessageClass messageClass)
           
 
Method Summary
 java.lang.String getMessageBody()
          Gets message body.
 MessageClass getMessageClass()
          MessageClass associated with this message.
 int getMessageID()
          Gets unique message id.
 int getRecipientUin()
          Gadu-Gadu number of user to whom this message is addressed or was received.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_recipientUin

protected int m_recipientUin
Uin of the Gadu-Gadu user


m_messageBody

protected java.lang.String m_messageBody
The body of the message


m_messageClass

protected MessageClass m_messageClass
The message class associated with this message


m_messageID

protected int m_messageID
Constructor Detail

AbstractMessage

protected AbstractMessage(int recepientUin,
                          java.lang.String messageBody,
                          MessageClass messageClass)
Method Detail

getRecipientUin

public int getRecipientUin()
Description copied from interface: IMessage
Gadu-Gadu number of user to whom this message is addressed or was received.

Specified by:
getRecipientUin in interface IMessage
Returns:
int Gadu-Gadu uin.
See Also:
IMessage.getRecipientUin()

getMessageBody

public java.lang.String getMessageBody()
Description copied from interface: IMessage
Gets message body.

Specified by:
getMessageBody in interface IMessage
Returns:
String message body.
See Also:
IMessage.getMessageBody()

getMessageID

public int getMessageID()
Description copied from interface: IMessage
Gets unique message id.

Specified by:
getMessageID in interface IMessage
Returns:
unique message id.
See Also:
IMessage.getMessageID()

getMessageClass

public MessageClass getMessageClass()
Description copied from interface: IMessage
MessageClass associated with this message.

Specified by:
getMessageClass in interface IMessage
Returns:
MessageClass related to this message.
See Also:
IMessage.getMessageClass()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright 2004-2004-2005 SourceForge.net. All Rights Reserved.