@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class LogMessage extends java.lang.Object implements java.io.Serializable
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
Modifier | Constructor and Description |
---|---|
protected |
LogMessage(LogMessage m)
Creates a log message from the provided log message.
|
protected |
LogMessage(java.lang.String s)
Parses the provided string as a log message.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getNamedValue(java.lang.String name)
Retrieves the value of the token with the specified name.
|
java.lang.Boolean |
getNamedValueAsBoolean(java.lang.String name)
Retrieves the value of the token with the specified name as a
Boolean . |
java.lang.Double |
getNamedValueAsDouble(java.lang.String name)
Retrieves the value of the token with the specified name as a
Double . |
java.lang.Integer |
getNamedValueAsInteger(java.lang.String name)
Retrieves the value of the token with the specified name as an
Integer . |
java.lang.Long |
getNamedValueAsLong(java.lang.String name)
Retrieves the value of the token with the specified name as a
Long . |
java.util.Map<java.lang.String,java.lang.String> |
getNamedValues()
Retrieves the set of named tokens for this log message, mapped from the
name to the corresponding value.
|
java.util.Date |
getTimestamp()
Retrieves the timestamp for this log message.
|
java.util.Set<java.lang.String> |
getUnnamedValues()
Retrieves the set of unnamed tokens for this log message.
|
boolean |
hasUnnamedValue(java.lang.String value)
Indicates whether this log message has the specified unnamed value.
|
java.lang.String |
toString()
Retrieves a string representation of this log message.
|
protected LogMessage(@NotNull LogMessage m)
m
- The log message to use to create this log message.protected LogMessage(@NotNull java.lang.String s) throws LogException
s
- The string to be parsed as a log message.LogException
- If the provided string cannot be parsed as a valid
log message.@NotNull public final java.util.Date getTimestamp()
@NotNull public final java.util.Map<java.lang.String,java.lang.String> getNamedValues()
@Nullable public final java.lang.String getNamedValue(@NotNull java.lang.String name)
name
- The name of the token to retrieve.null
if
there is no value with the specified name.@Nullable public final java.lang.Boolean getNamedValueAsBoolean(@NotNull java.lang.String name)
Boolean
.name
- The name of the token to retrieve.Boolean
, or null
if there is no value with the
specified name or the value cannot be parsed as a Boolean
.@Nullable public final java.lang.Double getNamedValueAsDouble(@NotNull java.lang.String name)
Double
.name
- The name of the token to retrieve.Double
, or null
if there is no value with the
specified name or the value cannot be parsed as a Double
.@Nullable public final java.lang.Integer getNamedValueAsInteger(@NotNull java.lang.String name)
Integer
.name
- The name of the token to retrieve.Integer
, or null
if there is no value with the
specified name or the value cannot be parsed as an
Integer
.@Nullable public final java.lang.Long getNamedValueAsLong(@NotNull java.lang.String name)
Long
.name
- The name of the token to retrieve.Long
,
or null
if there is no value with the specified name or
the value cannot be parsed as a Long
.@NotNull public final java.util.Set<java.lang.String> getUnnamedValues()
public final boolean hasUnnamedValue(@NotNull java.lang.String value)
value
- The value for which to make the determination.true
if this log message has the specified unnamed value,
or false
if not.