org.opennms.protocols.icmpd
Class CtrlSuspendMessage

java.lang.Object
  |
  +--org.opennms.protocols.icmpd.MessageHeader
        |
        +--org.opennms.protocols.icmpd.CtrlSuspendMessage

public final class CtrlSuspendMessage
extends MessageHeader

Defines the control message for an orderly shutdown of the communications channel with the icmpd server. Once the control message is sent the daemon should close the channel without responding. The format of the message is as follows:

 +--------+--------+----------------+
 |  TYPE  |  CODE  |   SEQUENCE     |
 +--------+--------+----------------+
 |     LENGTH      |   RESERVED     |
 +-----------------+----------------+
 

Version:
0.1
Author:
Brian Weaver

Field Summary
static byte CODE
          The class code.
static byte TYPE
          The class type.
 
Fields inherited from class org.opennms.protocols.icmpd.MessageHeader
m_code, m_length, m_reserved, m_sequence, m_type, sm_seq, TYPE_CONTROL, TYPE_DATA
 
Constructor Summary
  CtrlSuspendMessage()
          Creates a new suspend message with the default values.
(package private) CtrlSuspendMessage(MessageHeader hdr)
          Creates a new object based on the fields in the header.
 
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
 

Field Detail

TYPE

public static final byte TYPE
The class type.

CODE

public static final byte CODE
The class code.
Constructor Detail

CtrlSuspendMessage

public CtrlSuspendMessage()
Creates a new suspend message with the default values.

CtrlSuspendMessage

CtrlSuspendMessage(MessageHeader hdr)
Creates a new object based on the fields in the header.
Parameters:
hdr - The header containing the values for the object.
Throws:
IllegalArgumentException - Thrown if the type and code do not match in the header and class.