Package org.somox.common
Class Message
java.lang.Object
org.somox.common.Message
This class provides a data object for message encapsulation. It can be used to create more
structures messages especially if messages with variable levels have to be supported.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The possible levels of a message -
Constructor Summary
ConstructorDescriptionConstructor requiring minimum information.Message
(Message.MessageLevel level, String message) Constructor requiring common informationMessage
(Message.MessageLevel level, String message, Throwable throwable) Constructor requiring all information -
Method Summary
Modifier and TypeMethodDescriptiongetLevel()
void
setLevel
(Message.MessageLevel level) void
setMessage
(String message) void
setThrowable
(Throwable throwable)
-
Constructor Details
-
Message
Constructor requiring all information -
Message
Constructor requiring common information -
Message
Constructor requiring minimum information. This will result in an info message.
-
-
Method Details
-
setMessage
- Parameters:
message
- the message to set
-
getMessage
- Returns:
- the message
-
setLevel
- Parameters:
level
- the level to set
-
getLevel
- Returns:
- the level
-
setThrowable
- Parameters:
throwable
- the throwable to set
-
getThrowable
- Returns:
- the throwable
-