it.jnrpe.net
Class JNRPERequest

java.lang.Object
  extended by it.jnrpe.net.JNRPERequest

public class JNRPERequest
extends Object

This object represent a generic request packet

Author:
Massimiliano Ziccardi

Constructor Summary
JNRPERequest(InputStream in)
           
 
Method Summary
protected  void _setMessage(String sMessage)
           
protected  void fromInputStream(InputStream in)
          Initialize the object reading the data from the input stream
 int getCRC()
           
 int getPacketType()
           
 int getPacketVersion()
           
 int getResultCode()
           
 String getStringMessage()
           
protected  void initRandomBuffer()
           
 void setCRC(int iCRC)
           
protected  void setPacketType(int iPacketType)
           
 void setPacketVersion(int iPacketVersion)
           
 void setResultCode(int iResultCode)
           
 byte[] toByteArray()
           
 void validate()
          Validates the packet CRC
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNRPERequest

public JNRPERequest(InputStream in)
             throws IOException,
                    BadCRCException
Throws:
IOException
BadCRCException
Method Detail

getCRC

public int getCRC()

getPacketType

public int getPacketType()

getPacketVersion

public int getPacketVersion()

setCRC

public void setCRC(int iCRC)

setPacketType

protected void setPacketType(int iPacketType)

setPacketVersion

public void setPacketVersion(int iPacketVersion)

getResultCode

public int getResultCode()

setResultCode

public void setResultCode(int iResultCode)

fromInputStream

protected void fromInputStream(InputStream in)
                        throws IOException
Initialize the object reading the data from the input stream

Parameters:
in -
Throws:
IOException

validate

public void validate()
              throws BadCRCException
Validates the packet CRC

Throws:
BadCRCException

toByteArray

public byte[] toByteArray()

getStringMessage

public String getStringMessage()

_setMessage

protected void _setMessage(String sMessage)

initRandomBuffer

protected void initRandomBuffer()


Copyright © 2012. All Rights Reserved.