com.web_visage.ichat.messages
Class IChatBoardMessage

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

public class IChatBoardMessage
extends IChatMessage

IChat board message.

Holds board message text of some board's block.

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
IChatBoardMessage(int aMsgNumber, IChatSender aSender, int aBlockNumber, java.lang.String aText)
          Constructor.
 
Method Summary
 void acceptVisitor(IChatMessageVisitor aVisitor)
          Accepts the IChatMessageVisitorimplementations.
 int getBlockNumber()
          Returns message block number.
 java.lang.String getText()
          Returns board message body.
static IChatBoardMessage newInstance(int aMsgNumber, IChatSender aSender, IChatParameterAccessor anAccessor)
          Returns message instance by given raw parameters array.
 IChatBoardMessage 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

IChatBoardMessage

public IChatBoardMessage(int aMsgNumber,
                         IChatSender aSender,
                         int aBlockNumber,
                         java.lang.String aText)
Constructor.

Parameters:
aMsgNumber -
aCommand -
aSender -
aBlockNumber -
aText -
Method Detail

getBlockNumber

public int getBlockNumber()
Returns message block number.

Returns:

getText

public java.lang.String getText()
Returns board message body.

Returns:

updateText

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

Parameters:
text -
Returns:

newInstance

public static IChatBoardMessage newInstance(int aMsgNumber,
                                            IChatSender aSender,
                                            IChatParameterAccessor anAccessor)
Returns message instance by given raw parameters array.

Parameters:
aMsgNumber -
aSender -
aBlockNumber -
aText -
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)