OpenNMS API 1.2.9

## org.opennms.netmgt.poller.nrpe
Class NrpePacket

    java.lang.Object
      org.opennms.netmgt.poller.nrpe.NrpePacket

public class NrpePacket
extends java.lang.Object

Field Summary
`static int` `DEFAULT_PADDING`
`static java.lang.String` `HELLO_COMMAND`
`private java.lang.String` `m_buffer`
`private short` `m_resultCode`
`private short` `m_type`
`private short` `m_version`
`static int` `MAX_PACKETBUFFER_LENGTH`
`static int` `PACKET_SIZE`
`static short` `PACKET_VERSION_2`
`static short` `QUERY_PACKET`
`static short` `RESPONSE_PACKET`

Constructor Summary
`NrpePacket()`
`NrpePacket(short type, short resultCode, java.lang.String buffer)`

Method Summary
`byte[]` `buildPacket(int padding)`
`byte[]` `buildPacket(int padding, java.security.SecureRandom random)`
`java.lang.String` `getBuffer()`
`short` `getResultCode()`
`short` `getType()`
`short` `getVersion()`
`static int` `positive(byte b)`
`static NrpePacket` `receivePacket(java.io.InputStream i, int padding)`
`void` `setBuffer(java.lang.String buffer)`
`void` `setResultCode(short resultCode)`
`void` `setType(short type)`
`void` `setVersion(short version)`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### QUERY_PACKET

    public static final short QUERY_PACKET

See Also:
  Constant Field Values

### RESPONSE_PACKET

    public static final short RESPONSE_PACKET

See Also:
  Constant Field Values

### HELLO_COMMAND

    public static final java.lang.String HELLO_COMMAND

See Also:
  Constant Field Values

### PACKET_VERSION_2

    public static final short PACKET_VERSION_2

See Also:
  Constant Field Values

### MAX_PACKETBUFFER_LENGTH

    public static final int MAX_PACKETBUFFER_LENGTH

See Also:
  Constant Field Values

### PACKET_SIZE

    public static final int PACKET_SIZE

See Also:
  Constant Field Values

### DEFAULT_PADDING

    public static final int DEFAULT_PADDING

See Also:
  Constant Field Values

### m_version

    private short m_version

### m_type

    private short m_type

### m_resultCode

    private short m_resultCode

### m_buffer

    private java.lang.String m_buffer

Constructor Detail

### NrpePacket

    public NrpePacket()

### NrpePacket

    public NrpePacket(short type,
                      short resultCode,
                      java.lang.String buffer)

Method Detail

### getVersion

    public short getVersion()

### setVersion

    public void setVersion(short version)

### getType

    public short getType()

### setType

    public void setType(short type)

### getResultCode

    public short getResultCode()

### setResultCode

    public void setResultCode(short resultCode)

### getBuffer

    public java.lang.String getBuffer()

### setBuffer

    public void setBuffer(java.lang.String buffer)

### receivePacket

    public static NrpePacket receivePacket(java.io.InputStream i,
                                           int padding)
                                    throws NrpeException,
                                           java.io.IOException

  Throws:
    `NrpeException`
    `java.io.IOException`

### positive

    public static int positive(byte b)

### toString

    public java.lang.String toString()

### buildPacket

    public byte[] buildPacket(int padding)

### buildPacket

    public byte[] buildPacket(int padding,
                              java.security.SecureRandom random)

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.