org.opennms.netmgt.poller.nrpe
Class CheckNrpe

java.lang.Object
  extended by org.opennms.netmgt.poller.nrpe.CheckNrpe

public class CheckNrpe
extends Object

CheckNrpe class.

Version:
$Id: $
Author:
ranger

Field Summary
static int DEFAULT_PORT
          Constant DEFAULT_PORT=5666
static int DEFAULT_TIMEOUT
          Constant DEFAULT_TIMEOUT=10
 
Constructor Summary
CheckNrpe()
           
 
Method Summary
static NrpePacket executeQuery(String host, int port, String buffer, int padding)
          executeQuery
static NrpePacket executeQuery(String host, String buffer)
          executeQuery
static NrpePacket executeQuery(String host, String buffer, int padding)
          executeQuery
static void main(String[] argv)
          main
static String nextArg(String[] argv, int i)
          nextArg
static NrpePacket sendPacket(short type, short resultCode, String buffer)
          sendPacket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Constant DEFAULT_PORT=5666

See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final int DEFAULT_TIMEOUT
Constant DEFAULT_TIMEOUT=10

See Also:
Constant Field Values
Constructor Detail

CheckNrpe

public CheckNrpe()
Method Detail

executeQuery

public static NrpePacket executeQuery(String host,
                                      String buffer)
                               throws Exception

executeQuery

Parameters:
host - a String object.
buffer - a String object.
Returns:
a NrpePacket object.
Throws:
Exception - if any.

executeQuery

public static NrpePacket executeQuery(String host,
                                      String buffer,
                                      int padding)
                               throws Exception

executeQuery

Parameters:
host - a String object.
buffer - a String object.
padding - a int.
Returns:
a NrpePacket object.
Throws:
Exception - if any.

executeQuery

public static NrpePacket executeQuery(String host,
                                      int port,
                                      String buffer,
                                      int padding)
                               throws Exception

executeQuery

Parameters:
host - a String object.
port - a int.
buffer - a String object.
padding - a int.
Returns:
a NrpePacket object.
Throws:
Exception - if any.

sendPacket

public static NrpePacket sendPacket(short type,
                                    short resultCode,
                                    String buffer)
                             throws Exception

sendPacket

Parameters:
type - a short.
resultCode - a short.
buffer - a String object.
Returns:
a NrpePacket object.
Throws:
Exception - if any.

main

public static void main(String[] argv)
                 throws Exception

main

Parameters:
argv - an array of String objects.
Throws:
Exception - if any.

nextArg

public static String nextArg(String[] argv,
                             int i)
                      throws Exception

nextArg

Parameters:
argv - an array of String objects.
i - a int.
Returns:
a String object.
Throws:
Exception - if any.


Copyright © 2011. All Rights Reserved.