com.web_visage.ichat.messages
Class IChatTextMessage

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

public class IChatTextMessage
extends IChatMessage

IChat text 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
IChatTextMessage(int aMsgNumber, IChatSender aSender, java.lang.String aLineName, java.lang.String aText, java.lang.String aReceiver)
          Constructor.
 
Method Summary
 void acceptVisitor(IChatMessageVisitor aVisitor)
          Accepts the IChatMessageVisitorimplementations.
 java.lang.String getLineName()
          Returns the line name.
 java.lang.String getReceiver()
          Returns the string representation of the receiver.
 java.lang.String getText()
          Returns the message text.
static IChatTextMessage newInstance(int aMsgNumber, IChatSender aSender, IChatParameterAccessor aParameters)
          Creates new message by raw parameters array.
 IChatTextMessage updateText(java.lang.String text)
          Creates IChatTextMessage object 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

IChatTextMessage

public IChatTextMessage(int aMsgNumber,
                        IChatSender aSender,
                        java.lang.String aLineName,
                        java.lang.String aText,
                        java.lang.String aReceiver)
Constructor.

Parameters:
aMsgNumber -
aSender -
aLineName -
aText -
aReceiver -
Method Detail

getLineName

public final java.lang.String getLineName()
Returns the line name.

Returns:

getText

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

Returns:

getReceiver

public final java.lang.String getReceiver()
Returns the string representation of the receiver.

Returns:

newInstance

public static IChatTextMessage newInstance(int aMsgNumber,
                                           IChatSender aSender,
                                           IChatParameterAccessor aParameters)
Creates new message by 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)

updateText

public IChatTextMessage updateText(java.lang.String text)
Creates IChatTextMessage object with updated text. Does not modify origin.

Parameters:
text -
Returns: