|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.jnrpe.ReturnValue
public final class ReturnValue
This class is just a container for the plugin result.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReturnValue()
public ReturnValue(String sMessage)
IJNRPEConstants.STATE_OK state.
sMessage - The message
public ReturnValue(int iReturnCode,
String sMessage)
ReturnValue(Status, String) instead
iReturnCode - The statesMessage - The message
public ReturnValue(Status status,
String sMessage)
status - The status to be returnedsMessage - The message to be returned| Method Detail |
|---|
public ReturnValue withReturnCode(int iReturnCode)
withStatus(Status) instead.
iReturnCode - The return code
public ReturnValue withStatus(Status status)
status - The status to be returned to Nagios
public ReturnValue withMessage(String sMessage)
sMessage - The message to be returned
public int getReturnCode()
getStatus() instead.
public Status getStatus()
public String getMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||