org.opennms.netmgt.poller.nrpe
Class NrpePacket
java.lang.Object
org.opennms.netmgt.poller.nrpe.NrpePacket
public class NrpePacket
- extends Object
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 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
NrpePacket
public NrpePacket()
NrpePacket
public NrpePacket(short type,
short resultCode,
String buffer)
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 String getBuffer()
setBuffer
public void setBuffer(String buffer)
receivePacket
public static NrpePacket receivePacket(InputStream i,
int padding)
throws NrpeException,
IOException
- Throws:
NrpeException
IOException
positive
public static int positive(byte b)
toString
public String toString()
- Overrides:
toString in class Object
buildPacket
public byte[] buildPacket(int padding)
buildPacket
public byte[] buildPacket(int padding,
SecureRandom random)
Copyright © 2009. All Rights Reserved.