Class CheckNrpe


  • public abstract class CheckNrpe
    extends java.lang.Object

    CheckNrpe class.

    Version:
    $Id: $
    Author:
    ranger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFAULT_PORT
      Constant DEFAULT_PORT=5666
      static int DEFAULT_TIMEOUT
      Constant DEFAULT_TIMEOUT=10
    • Constructor Summary

      Constructors 
      Constructor Description
      CheckNrpe()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static NrpePacket executeQuery​(java.lang.String host, int port, java.lang.String buffer, int padding)
      executeQuery
      static NrpePacket executeQuery​(java.lang.String host, java.lang.String buffer)
      executeQuery
      static NrpePacket executeQuery​(java.lang.String host, java.lang.String buffer, int padding)
      executeQuery
      static void main​(java.lang.String[] argv)
      main
      static java.lang.String nextArg​(java.lang.String[] argv, int i)
      nextArg
      static NrpePacket sendPacket​(short type, short resultCode, java.lang.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​(java.lang.String host,
                                              java.lang.String buffer)
                                       throws java.lang.Exception

        executeQuery

        Parameters:
        host - a String object.
        buffer - a String object.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        java.lang.Exception - if any.
      • executeQuery

        public static NrpePacket executeQuery​(java.lang.String host,
                                              java.lang.String buffer,
                                              int padding)
                                       throws java.lang.Exception

        executeQuery

        Parameters:
        host - a String object.
        buffer - a String object.
        padding - a int.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        java.lang.Exception - if any.
      • executeQuery

        public static NrpePacket executeQuery​(java.lang.String host,
                                              int port,
                                              java.lang.String buffer,
                                              int padding)
                                       throws java.lang.Exception

        executeQuery

        Parameters:
        host - a String object.
        port - a int.
        buffer - a String object.
        padding - a int.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        java.lang.Exception - if any.
      • sendPacket

        public static NrpePacket sendPacket​(short type,
                                            short resultCode,
                                            java.lang.String buffer)
                                     throws java.lang.Exception

        sendPacket

        Parameters:
        type - a short.
        resultCode - a short.
        buffer - a String object.
        Returns:
        a org.opennms.netmgt.poller.nrpe.NrpePacket object.
        Throws:
        java.lang.Exception - if any.
      • main

        public static void main​(java.lang.String[] argv)
                         throws java.lang.Exception

        main

        Parameters:
        argv - an array of String objects.
        Throws:
        java.lang.Exception - if any.
      • nextArg

        public static java.lang.String nextArg​(java.lang.String[] argv,
                                               int i)
                                        throws java.lang.Exception

        nextArg

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