Class MessageRoomModelBean
java.lang.Object
io.github.astrapi69.design.pattern.observer.chat.MessageRoomModelBean
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionMessageRoomModelBean
(String chatRoomName, IUser<?> user, String message, Byte[] data) Instantiates a newMessageRoomModelBean
with the specified details -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the chat roomByte[]
getData()
Gets the additional data associated with the messagegetDate()
Gets the date the message was createdGets the content of the messageIUser<?>
getUser()
Gets the user who sent the messagevoid
Sets the additional data associated with the messagevoid
setMessage
(String message) Sets the content of the message
-
Constructor Details
-
MessageRoomModelBean
Instantiates a newMessageRoomModelBean
with the specified details- Parameters:
chatRoomName
- the name of the chat roomuser
- the user who sent the messagemessage
- the content of the messagedata
- any additional data associated with the message
-
-
Method Details
-
getChatRoomName
Gets the name of the chat room- Returns:
- the chat room name
-
getData
Gets the additional data associated with the message- Returns:
- the data
-
setData
Sets the additional data associated with the message- Parameters:
data
- the new data
-
getDate
Gets the date the message was created- Returns:
- the creation date of the message
-
getMessage
Gets the content of the message- Returns:
- the message content
-
setMessage
Sets the content of the message- Parameters:
message
- the new message content
-
getUser
Gets the user who sent the message- Returns:
- the user who sent the message
-