com.levigo.util.log.qualified
Class AbstractQualifiedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.levigo.util.log.qualified.AbstractQualifiedException
- All Implemented Interfaces:
- QualifiedMessage, UnresolvedQualifiedMessage, Serializable
- Direct Known Subclasses:
- JadiceException
public abstract class AbstractQualifiedException
- extends Exception
- implements UnresolvedQualifiedMessage
- Author:
- hennejg
- See Also:
- Serialized Form
AbstractQualifiedException
public AbstractQualifiedException(MessageID messageId,
Object... args)
AbstractQualifiedException
public AbstractQualifiedException(MessageID messageId,
Throwable cause,
Object... args)
getMessageID
public MessageID getMessageID()
- Specified by:
getMessageID
in interface UnresolvedQualifiedMessage
getId
public String getId()
- Description copied from interface:
QualifiedMessage
- returns the message id of this logging event in the format
COMPONENT_ID-EVENT_ID
.
The COMPONENT_ID and EVENT_ID may contain arbitrary characters
except the dash (-
).
- Specified by:
getId
in interface QualifiedMessage
- Returns:
getArguments
public Object[] getArguments()
- Specified by:
getArguments
in interface UnresolvedQualifiedMessage
getMessage
public String getMessage()
- Description copied from interface:
QualifiedMessage
- Resolves and returns the human-readable message text of this qualified
entity using the current default locale, i.e. the one returned by
Locale.getDefault()
.
Caveats:
- Resolving the message text may consume an unpredictable amount of
time.
- Message IDs are not guaranteed to be accompanied with a human-readable
message. Therefore this method may return
null
.
- Specified by:
getMessage
in interface QualifiedMessage
- Overrides:
getMessage
in class Throwable
- Returns:
- a human readable message text for this QualifiedMessage entity.
getMessage
public String getMessage(Locale locale)
- Description copied from interface:
UnresolvedQualifiedMessage
- Resolves and returns the human-readable message text of this qualified entity using the
specified
Locale
. Message IDs are not guaranteed to be accompanied with a
human-readable message. Therefore this method may return null
.
- Specified by:
getMessage
in interface UnresolvedQualifiedMessage
- Parameters:
locale
- the Locale
in which so resolve the message
- Returns:
- a human readable message text for this QualifiedMessage entity, or
null
if
no human-readable message is available
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.