org.opennms.protocols.icmpd
Class CtrlResponseMessage
java.lang.Object
|
+--org.opennms.protocols.icmpd.MessageHeader
|
+--org.opennms.protocols.icmpd.CtrlResponseMessage
- public final class CtrlResponseMessage
- extends MessageHeader
Defines the control message for an acknowldgement of the communications
channel with the icmpd server. This message is generated by the server
to inform the application of a requests success or failure. The format of the
message is as follows:
+--------+--------+----------------+
| TYPE | CODE | SEQUENCE |
+--------+--------+----------------+
| LENGTH | ERROR CODE |
+-----------------+----------------+
- Version:
- 0.1
- Author:
- Brian Weaver
Field Summary |
static byte |
CODE
The message code |
static byte |
TYPE
The message type |
Method Summary |
int |
getErrorCode()
Returns the error code of the acknowledgement |
void |
setErrorCode(int code)
sets the error code |
Methods inherited from class org.opennms.protocols.icmpd.MessageHeader |
align4, getCode, getLength, getSequence, getType, makeInt, makeShort, nextSequenceId, read, setSequence, write |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
TYPE
public static final byte TYPE
- The message type
CODE
public static final byte CODE
- The message code
CtrlResponseMessage
public CtrlResponseMessage()
- Creates a default message
CtrlResponseMessage
CtrlResponseMessage(MessageHeader hdr)
- creates a default message based upon the header
- Throws:
IllegalArgumentException
- Thrown if the header does not
have the correct type or code.
getErrorCode
public int getErrorCode()
- Returns the error code of the acknowledgement
setErrorCode
public void setErrorCode(int code)
- sets the error code
- Parameters:
code
- The new error code.