public class MessagePayload extends Object implements Serializable
MessagePayloadBuilder
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
MessagePayload.UnknownHostRuntimeException |
Constructor and Description |
---|
MessagePayload()
Construct a new
MessagePayload with hostname being the short
hostname of this machine, level unknown, service name "undefined" and
empty message |
MessagePayload(boolean useLocalHostname)
Construct a new
MessagePayload with level unknown, service name "undefined" and
empty message |
MessagePayload(String hostname,
Level level,
String serviceName,
String message)
Construct a new
MessagePayload |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getHostname()
The hostname to be sent in this passive check
|
Level |
getLevel()
Get the level of the Passive check
|
String |
getMessage()
The message to send in this passive check
|
String |
getServiceName()
The service name of this passive check
|
int |
hashCode() |
void |
setHostname(boolean useCanonical)
Set the hostname in the passive check
|
void |
setHostname(String hostname)
Set the hostname in the passive check
|
void |
setLevel(Level level)
Set the level of the Passive check
|
void |
setLevel(String level)
|
void |
setMessage(String message)
Set the message to send in this passive check
|
void |
setServiceName(String serviceName)
Set the service name of this passive check
|
String |
toString() |
void |
useLocalHostname()
Use the short hostname of this machine in the passive check
|
public static final String UNKNOWN
public MessagePayload()
MessagePayload
with hostname being the short
hostname of this machine, level unknown, service name "undefined" and
empty messagepublic MessagePayload(boolean useLocalHostname)
MessagePayload
with level unknown, service name "undefined" and
empty messageuseLocalHostname
- - set hostname to be the local hostname of this machine, otherwise
will be set to "UNKNOWN";public MessagePayload(String hostname, Level level, String serviceName, String message)
MessagePayload
hostname
- the hostname to be sent in this passive checklevel
- the levelserviceName
- the service namemessage
- the messagepublic String getHostname()
public void useLocalHostname()
public void setHostname(boolean useCanonical)
useCanonical
- true to use this machines fully qualified domain name, false
to use the short hostnamepublic void setHostname(String hostname)
hostname
- the hostname to usepublic Level getLevel()
public void setLevel(String level)
level
- either "ok", "warning", "critical" or "unknown"public void setLevel(Level level)
level
- the levelpublic String getServiceName()
public void setServiceName(String serviceName)
serviceName
- the service namepublic String getMessage()
public void setMessage(String message)
message
- the messageCopyright © Nov 2008–2017 JSend NSCA. All rights reserved.