public final class ReturnValue extends Object
Constructor and Description |
---|
ReturnValue()
Initializes an empty return value.
|
ReturnValue(int iReturnCode,
String sMessage)
Deprecated.
Use
ReturnValue(Status, String) instead |
ReturnValue(Status status,
String sMessage)
Initializes the return value object with the given state and the given
message.
|
ReturnValue(String sMessage)
Initializes the return value object with the given message and with the
IJNRPEConstants#STATE_OK state. |
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the message.
|
int |
getReturnCode()
Deprecated.
Use
getStatus() instead. |
Status |
getStatus()
Returns the status.
|
ReturnValue |
withMessage(String sMessage)
Sets the message and returns 'this' so that the calls can be cascaded.
|
ReturnValue |
withReturnCode(int iReturnCode)
Deprecated.
Use
withStatus(Status) instead. |
ReturnValue |
withStatus(Status status)
Sets the return code and returns 'this' so that the calls can be
cascaded.
|
public ReturnValue()
public ReturnValue(String sMessage)
IJNRPEConstants#STATE_OK
state.sMessage
- The messagepublic ReturnValue(int iReturnCode, String sMessage)
ReturnValue(Status, String)
insteadiReturnCode
- The statesMessage
- The messagepublic ReturnValue withReturnCode(int iReturnCode)
withStatus(Status)
instead.iReturnCode
- The return codepublic ReturnValue withStatus(Status status)
status
- The status to be returned to Nagiospublic ReturnValue withMessage(String sMessage)
sMessage
- The message to be returnedpublic int getReturnCode()
getStatus()
instead.public Status getStatus()
public String getMessage()
Copyright © 2013. All Rights Reserved.