|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.jnrpe.client.JNRPEClient
public class JNRPEClient
This class represent a simple JNRPE client that can be used to invoke commands installed inside JNRPE by code. It is the JAVA equivalent of check_nrpe.
Constructor Summary | |
---|---|
JNRPEClient(String sJNRPEServerIP,
int iJNRPEServerPort,
boolean bSSL)
Instantiates a JNRPE client. |
Method Summary | |
---|---|
int |
getTimeout()
Returns the currently configured connection timeout in seconds |
static void |
main(String[] args)
|
it.jnrpe.ReturnValue |
sendCommand(String sCommandName,
String... arguments)
Inovoke a command installed in JNRPE. |
void |
setTimeout(int iTimeout)
Sets the connection timeout in seconds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JNRPEClient(String sJNRPEServerIP, int iJNRPEServerPort, boolean bSSL)
sJNRPEServerIP
- The IP where the JNRPE is installediJNRPEServerPort
- The port where the JNRPE server listensMethod Detail |
---|
public it.jnrpe.ReturnValue sendCommand(String sCommandName, String... arguments) throws JNRPEClientException
sCommandName
- The name of the command to be invokedarguments
- The arguments to pass to the command (will substitute the $ARGSx$ parameters)
JNRPEClientException
- Thrown on any communication error.public void setTimeout(int iTimeout)
iTimeout
- The new connection timeout. Default : 10public int getTimeout()
public static void main(String[] args) throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |