Package com.qfs.snl.messages
Interface IMessageBuilder.IBuildable
- Enclosing interface:
IMessageBuilder
public static interface IMessageBuilder.IBuildable
Builder with enough information to build the message.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionat
(long time) Sets the time of the message.build()
Builds the message with all provided information.withCategory
(String category) Sets the category of the message.withContent
(Object content) Sets the content of the message.withId
(long id) Sets the id of the message.withLevel
(MessageLevel type) Sets the type of the message.
-
Method Details
-
withId
Sets the id of the message.- Parameters:
id
- the message id- Returns:
- a buildable builder
-
at
Sets the time of the message.Default would be the time of creation.
- Parameters:
time
- the sent time as a UNIX timestamp (ms)- Returns:
- a buildable builder
-
withContent
Sets the content of the message.- Parameters:
content
- the body of the message- Returns:
- a buildable builder
-
withLevel
Sets the type of the message.Default type is
MessageLevel.DEFAULT
- Parameters:
type
- the type- Returns:
- a buildable builder
-
withCategory
Sets the category of the message.- Parameters:
category
- the name of the category.- Returns:
- a buildable builder
-
build
IMessage build()Builds the message with all provided information.- Returns:
- the created message.
-