com.web_visage.ichat.messages
Class IChatReceivedMessage

java.lang.Object
  extended by com.web_visage.ichat.IChatMessage
      extended by com.web_visage.ichat.messages.IChatReceivedMessage
All Implemented Interfaces:
ByteRepresentable, IChatMessageConstants

public class IChatReceivedMessage
extends IChatMessage

iChat received message.

Author:
K.Baturytski

Field Summary
 
Fields inherited from interface com.web_visage.ichat.IChatMessageConstants
BEGIN_END_MARKER, COMMON_LINE, ICHAT_TAG, PRIVATE_TAG, SEPARATOR, WILDCARD
 
Constructor Summary
IChatReceivedMessage(int aMsgNumber, IChatSender aSender, java.lang.String aLine, java.lang.String aText)
          Constructor.
 
Method Summary
 void acceptVisitor(IChatMessageVisitor aVisitor)
          Accepts the IChatMessageVisitorimplementations.
 java.lang.String getLine()
          Returns the line name.
 java.lang.String getText()
          Returns the message text.
static IChatReceivedMessage newInstance(int aMsgNumber, IChatSender aSender, IChatParameterAccessor aParameters)
          Creates new message instance by a given raw parameters array.
 IChatReceivedMessage updateText(java.lang.String text)
          Creates new message with updated text.
 
Methods inherited from class com.web_visage.ichat.IChatMessage
asByteArray, equals, getCmd, getMsgNumber, getParameter, getParameters, getSender, getSize, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IChatReceivedMessage

public IChatReceivedMessage(int aMsgNumber,
                            IChatSender aSender,
                            java.lang.String aLine,
                            java.lang.String aText)
Constructor.

Parameters:
aMsgNumber -
aSender -
aParameters -
Method Detail

getLine

public java.lang.String getLine()
Returns the line name.

Returns:

getText

public java.lang.String getText()
Returns the message text.

Returns:

updateText

public IChatReceivedMessage updateText(java.lang.String text)
Creates new message with updated text.

Parameters:
text -
Returns:

newInstance

public static IChatReceivedMessage newInstance(int aMsgNumber,
                                               IChatSender aSender,
                                               IChatParameterAccessor aParameters)
Creates new message instance by a given raw parameters array.

Parameters:
aMsgNumber -
aSender -
aParameters -
Returns:

acceptVisitor

public void acceptVisitor(IChatMessageVisitor aVisitor)
Description copied from class: IChatMessage
Accepts the IChatMessageVisitorimplementations.

Specified by:
acceptVisitor in class IChatMessage
See Also:
IChatMessage.acceptVisitor(com.web_visage.ichat.IChatMessageVisitor)