com.web_visage.ichat
Interface IChatMessageFactory

All Known Implementing Classes:
AbstractMessageFactory, DefaultMessageFactory

public interface IChatMessageFactory


Method Summary
 IChatAlertMessage createAlertMessage(int aMessageId, IChatSender aSender, java.lang.String anAlertText)
          Creates "alert" message.
 IChatBoardMessage createBoardMessage(int aMessageId, IChatSender aSender, int aBlockNumber, java.lang.String aText)
          Creates "board" message.
 IChatTextMessage createBroadcastMessage(int aMessageId, IChatSender aSender, java.lang.String aText)
          Creates private broadcast iChat message.
 IChatConnectMessage createConnectMessage(int aMessageId, IChatSender aSender, java.lang.String aLogin, java.lang.String aNickName, java.lang.String aGreetingMessage, java.lang.String aRecepient, EnumStatus aStatus)
          Creates connect message.
 IChatConnectMessage createConnectToLineMessage(int aMessageId, IChatSender aSender, java.lang.String aLogin, java.lang.String aNickName, java.lang.String aLine, java.lang.String aGreetingMessage, EnumStatus aStatus)
          Creates connect to line message.
 IChatCreateLineMessage createCreateLineMessage(int aMessageId, IChatSender aSender, java.lang.String aLine, java.lang.String aPassword)
          Creates create line message.
 IChatCreateMessage createCreateMessage(int aMessageId, IChatSender aSender, java.lang.String aLineId, java.lang.String aReceiver)
          Creates "create" message.
 IChatMessage createDisconnectFromLineMessage(int aMessageId, IChatSender aSender, java.lang.String aLineName)
          Creates disconnect from line message.
 IChatDisconnectMessage createDisconnectMessage(int aMessageId, IChatSender aSender)
          Creates disconnect message.
 IChatForwardMessage createForwardMessage(IChatSender aSender, java.lang.String aReceiver, IChatMessage aMessage)
          Creates public "transport" message.
 IChatMeMessage createMeMessage(int aMessageId, IChatSender aSender, java.lang.String aText)
          Creates "me" message.
 IChatMessage[] createMessage(byte[] aCryptedMessage)
          Creates message from the raw byte form.
 IChatMessage createPrivateMessage(int aMessageId, IChatSender aSender, java.lang.String aReceiver, java.lang.String aText)
          Creates private iChat message.
 IChatTextMessage createPublicMessage(int aMessageId, IChatSender aSender, java.lang.String aText)
          Creates public iChat message.
 IChatReceivedMessage createReceivedMessage(int aMessageId, IChatSender aSender, java.lang.String aConfirmationText)
          Creates "received" message.
 IChatRefreshBoardMessage createRefreshBoardMessage(int aMessageId, IChatSender aSender)
          Creates "refresh board" message.
 IChatRefreshMessage createRefreshLineMessage(int aMessageId, IChatSender aSender, java.lang.String aLogin, java.lang.String aNickName, java.lang.String aLineName, java.lang.String aGreetingMessage, java.lang.String aReceiver, EnumStatus aStatus)
          Creates refresh-line message.
 IChatRefreshMessage createRefreshMessage(int aMessageId, IChatSender aSender, java.lang.String aLogin, java.lang.String aNickName, java.lang.String aGreetingMessage, java.lang.String aReceiver, EnumStatus aStatus)
          Creates refresh message.
 IChatRenameMessage createRenameMessage(int aMessageId, IChatSender aSender, java.lang.String aNewNick)
          Creates "rename" message.
 IChatServerForwardMessage createServerForwardMessage(IChatMessage aMessage)
          Creates server "forward" message.
 IChatStatusMessage createStatusMessage(int aMessageId, IChatSender aSender, EnumStatus aStatus, java.lang.String aGreetingMessage)
          Creates STATUS message.
 IChatStatusReqMessage createStatusReqMessage(int aMessageId, IChatSender aSender)
          Creates STATUS_REQ message.
 

Method Detail

createAlertMessage

IChatAlertMessage createAlertMessage(int aMessageId,
                                     IChatSender aSender,
                                     java.lang.String anAlertText)
Creates "alert" message.

Parameters:
aMessageId - - incremental message id
aSender - - sender object
anAlertText - - alert text
Returns:
fulfilled message object

createBoardMessage

IChatBoardMessage createBoardMessage(int aMessageId,
                                     IChatSender aSender,
                                     int aBlockNumber,
                                     java.lang.String aText)
Creates "board" message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender
aBlockNumber - - a block number
aText - - a message text
Returns:

createBroadcastMessage

IChatTextMessage createBroadcastMessage(int aMessageId,
                                        IChatSender aSender,
                                        java.lang.String aText)
Creates private broadcast iChat message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender
aText - - text of the public message
Returns:

createConnectMessage

IChatConnectMessage createConnectMessage(int aMessageId,
                                         IChatSender aSender,
                                         java.lang.String aLogin,
                                         java.lang.String aNickName,
                                         java.lang.String aGreetingMessage,
                                         java.lang.String aRecepient,
                                         EnumStatus aStatus)
Creates connect message.

Parameters:
aMessageId - - incremental message id (increments with each message sent)
aSender - - a sender object
aLogin - - user's system login
aNickName - - your nick name
aGreetingMessage - - greeting message
aStatus - - user status
Returns:

createConnectToLineMessage

IChatConnectMessage createConnectToLineMessage(int aMessageId,
                                               IChatSender aSender,
                                               java.lang.String aLogin,
                                               java.lang.String aNickName,
                                               java.lang.String aLine,
                                               java.lang.String aGreetingMessage,
                                               EnumStatus aStatus)
Creates connect to line message.

Parameters:
aMessageId - - incremental message id (increments with each message sent)
aSender - - a sender
aLogin - - user's system login
aNickName - - your nick name
aLine - - line name
aGreetingMessage - - greeting message
aStatus - - user status
Returns:

createCreateMessage

IChatCreateMessage createCreateMessage(int aMessageId,
                                       IChatSender aSender,
                                       java.lang.String aLineId,
                                       java.lang.String aReceiver)
Creates "create" message.

Parameters:
aMessageId - - incremental message id
aSender - - sender object
aLineId - - line identifier
aReceiver - - receiver
Returns:

createCreateLineMessage

IChatCreateLineMessage createCreateLineMessage(int aMessageId,
                                               IChatSender aSender,
                                               java.lang.String aLine,
                                               java.lang.String aPassword)
Creates create line message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender object
aLine - - a line name
aPassword - - the line password
Returns:

createDisconnectFromLineMessage

IChatMessage createDisconnectFromLineMessage(int aMessageId,
                                             IChatSender aSender,
                                             java.lang.String aLineName)
Creates disconnect from line message.

Parameters:
aMessageId -
aSender -
aLineName -
Returns:

createDisconnectMessage

IChatDisconnectMessage createDisconnectMessage(int aMessageId,
                                               IChatSender aSender)
Creates disconnect message.

Parameters:
aMessageId - - incremental message id (increments with each message sent)
aSender - - a sender
Returns:

createForwardMessage

IChatForwardMessage createForwardMessage(IChatSender aSender,
                                         java.lang.String aReceiver,
                                         IChatMessage aMessage)
Creates public "transport" message. Forward message is a wrapper for all messages types.

Parameters:
aSender - - a sender object
aReceiver - - receiver name or '*' for all
aMessage - - unencrypted message to wrap
Returns:
ready to send forward message (with encrypted message inside)

createServerForwardMessage

IChatServerForwardMessage createServerForwardMessage(IChatMessage aMessage)
Creates server "forward" message. Acts as transport wrapper for all message types delivered to client.

Parameters:
aMessage -
Returns:

createMeMessage

IChatMeMessage createMeMessage(int aMessageId,
                               IChatSender aSender,
                               java.lang.String aText)
Creates "me" message.

Parameters:
aMessageId - - incremental message id
aSender - - sender object
aNewNick - - new nickname
Returns:
fulfilled message object

createMessage

IChatMessage[] createMessage(byte[] aCryptedMessage)
                             throws IChatException
Creates message from the raw byte form. Since there is possibility to have more than one message in a block, function returns an array of messages.

Parameters:
aCryptedMessage - - crypted raw byte data
Returns:
Throws:
IChatException

createPrivateMessage

IChatMessage createPrivateMessage(int aMessageId,
                                  IChatSender aSender,
                                  java.lang.String aReceiver,
                                  java.lang.String aText)
Creates private iChat message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender
aText - - text of the public message
aReceiver - - receiver of the message
Returns:

createPublicMessage

IChatTextMessage createPublicMessage(int aMessageId,
                                     IChatSender aSender,
                                     java.lang.String aText)
Creates public iChat message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender
aText - - text of the public message
Returns:

createReceivedMessage

IChatReceivedMessage createReceivedMessage(int aMessageId,
                                           IChatSender aSender,
                                           java.lang.String aConfirmationText)
Creates "received" message.

Parameters:
aMessageId -
aSender -
aConfirmationText -
Returns:

createRefreshLineMessage

IChatRefreshMessage createRefreshLineMessage(int aMessageId,
                                             IChatSender aSender,
                                             java.lang.String aLogin,
                                             java.lang.String aNickName,
                                             java.lang.String aLineName,
                                             java.lang.String aGreetingMessage,
                                             java.lang.String aReceiver,
                                             EnumStatus aStatus)
Creates refresh-line message.

Parameters:
aMessageId - - incremental message id
aSender - - fully qualified sender name [ip-address/netbios-name/login] (192.168.1.11/SOME/name1)
aLogin -
aNickName -
aLineName -
aGreetingMessage -
aStatus -
Returns:

createRefreshBoardMessage

IChatRefreshBoardMessage createRefreshBoardMessage(int aMessageId,
                                                   IChatSender aSender)
Creates "refresh board" message.

Parameters:
aMessageId - - an incremental message id
aSender - - sender object
Returns:

createRefreshMessage

IChatRefreshMessage createRefreshMessage(int aMessageId,
                                         IChatSender aSender,
                                         java.lang.String aLogin,
                                         java.lang.String aNickName,
                                         java.lang.String aGreetingMessage,
                                         java.lang.String aReceiver,
                                         EnumStatus aStatus)
Creates refresh message.

Parameters:
aMessageId - - incremental message id
aSender - - fully qualified sender name [ip-address/netbios-name/login] (192.168.1.11/SOME/name1)
aLogin -
aNickName -
aGreetingMessage -
aStatus -
Returns:

createRenameMessage

IChatRenameMessage createRenameMessage(int aMessageId,
                                       IChatSender aSender,
                                       java.lang.String aNewNick)
Creates "rename" message.

Parameters:
aMessageId -
aSender -
aNewNick -
Returns:

createStatusMessage

IChatStatusMessage createStatusMessage(int aMessageId,
                                       IChatSender aSender,
                                       EnumStatus aStatus,
                                       java.lang.String aGreetingMessage)
Creates STATUS message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender
aStatus - - a status
aGreetingMessage -
Returns:

createStatusReqMessage

IChatStatusReqMessage createStatusReqMessage(int aMessageId,
                                             IChatSender aSender)
Creates STATUS_REQ message.

Parameters:
aMessageId - - incremental message id
aSender - - a sender
Returns: