|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.jnrpe.net.JNRPERequest
public class JNRPERequest
This object represent a generic request packet.
Constructor Summary | |
---|---|
JNRPERequest()
Creates and empty request. |
|
JNRPERequest(String commandName,
String... arguments)
Inizialize the request with the supplied command and command arguments. |
Method Summary | |
---|---|
String[] |
getArguments()
Returns the command arguments. |
String |
getCommand()
Returns the query command. |
PacketVersion |
getPacketVersion()
Returns the packet version. |
int |
getResultCode()
Returns the result code. |
void |
setCharset(Charset newCharset)
Changes the default charset. |
void |
setPacketVersion(PacketVersion version)
Sets the packet version. |
void |
setResultCode(int status)
Sets the result code. |
byte[] |
toByteArray()
Converts the packet object to its byte array representation. |
void |
validate()
Validates the packet CRC. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JNRPERequest()
public JNRPERequest(String commandName, String... arguments)
commandName
- The commandarguments
- The argumentsMethod Detail |
---|
public final String getCommand()
public final String[] getArguments()
public PacketVersion getPacketVersion()
public void setPacketVersion(PacketVersion version)
version
- The packet versionpublic void setCharset(Charset newCharset)
newCharset
- the new charset,public int getResultCode()
public void setResultCode(int status)
status
- The new result codepublic void validate() throws BadCRCException
BadCRCException
- If the CRC can't be validatedpublic byte[] toByteArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |