Class MessageLoader
- java.lang.Object
-
- org.sblim.cimclient.internal.logging.MessageLoader
-
public final class MessageLoader extends java.lang.Object
Class MessageLoader encapsulates the access to the resource file containing log messages.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.logging.Level
getLevel(java.lang.String pKey)
Returns the level of a given message id based on the naming convention.static java.lang.String
getLocalizedMessage(java.lang.String pKey)
Returns the localized message for a given key.static java.lang.String
getMessage(java.lang.String pKey)
Returns the English message for a given key.
-
-
-
Method Detail
-
getMessage
public static java.lang.String getMessage(java.lang.String pKey)
Returns the English message for a given key.- Parameters:
pKey
- The key- Returns:
- The message
-
getLocalizedMessage
public static java.lang.String getLocalizedMessage(java.lang.String pKey)
Returns the localized message for a given key.- Parameters:
pKey
- The key- Returns:
- The message
-
getLevel
public static java.util.logging.Level getLevel(java.lang.String pKey)
Returns the level of a given message id based on the naming convention. The convention is:CIM<unique 4 digit id><level token>
, e.g.CIM1234S
. Valid level tokens areS, W, I
andC
forSEVERE, WARNING, INFO
andCONFIG
respectively.- Parameters:
pKey
- The message id- Returns:
- The level
-
-