org.opennms.protocols.icmpd
Class CtrlCloseMessage

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

public final class CtrlCloseMessage
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 code for the message
static byte TYPE
          The type for the message
 
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
CtrlCloseMessage()
          Class constructor.
CtrlCloseMessage(MessageHeader hdr)
          Constructs a control close message using the values specified 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 type for the message

CODE

public static final byte CODE
The code for the message
Constructor Detail

CtrlCloseMessage

public CtrlCloseMessage()
Class constructor. Constructs the control close message with the appropiate values.

CtrlCloseMessage

public CtrlCloseMessage(MessageHeader hdr)
Constructs a control close message using the values specified in the header.
Parameters:
hdr - The header to copy into self.
Throws:
IllegalArgumentException - Thrown if the headers is not a control close message.