java.lang.Object
io.github.astrapi69.design.pattern.observer.chat.MessageRoomModelBean
All Implemented Interfaces:
Serializable

public class MessageRoomModelBean extends Object implements Serializable
The class MessageRoomModelBean represents a model for a message in a chat room It includes details such as the chat room name, the user who sent the message, the message content, and any associated data, as well as the date the message was created
See Also:
  • Constructor Details

    • MessageRoomModelBean

      public MessageRoomModelBean(String chatRoomName, IUser<?> user, String message, Byte[] data)
      Instantiates a new MessageRoomModelBean with the specified details
      Parameters:
      chatRoomName - the name of the chat room
      user - the user who sent the message
      message - the content of the message
      data - any additional data associated with the message
  • Method Details

    • getChatRoomName

      public String getChatRoomName()
      Gets the name of the chat room
      Returns:
      the chat room name
    • getData

      public Byte[] getData()
      Gets the additional data associated with the message
      Returns:
      the data
    • setData

      public void setData(Byte[] data)
      Sets the additional data associated with the message
      Parameters:
      data - the new data
    • getDate

      public Date getDate()
      Gets the date the message was created
      Returns:
      the creation date of the message
    • getMessage

      public String getMessage()
      Gets the content of the message
      Returns:
      the message content
    • setMessage

      public void setMessage(String message)
      Sets the content of the message
      Parameters:
      message - the new message content
    • getUser

      public IUser<?> getUser()
      Gets the user who sent the message
      Returns:
      the user who sent the message