org.apache.directory.server.dhcp.options.dhcp
Class DhcpMessageType

java.lang.Object
  extended by org.apache.directory.server.dhcp.options.DhcpOption
      extended by org.apache.directory.server.dhcp.options.dhcp.DhcpMessageType

public class DhcpMessageType
extends DhcpOption

This option is used to convey the type of the DHCP message. The code for this option is 53, and its length is 1. Legal values for this option are: Value Message Type ----- ------------ 1 DHCPDISCOVER 2 DHCPOFFER 3 DHCPREQUEST 4 DHCPDECLINE 5 DHCPACK 6 DHCPNAK 7 DHCPRELEASE 8 DHCPINFORM

Version:
$Rev: 638228 $, $Date: 2008-03-18 07:12:41 +0100 (Tue, 18 Mar 2008) $
Author:
Apache Directory Project

Constructor Summary
DhcpMessageType()
           
DhcpMessageType(MessageType type)
           
 
Method Summary
 byte[] getData()
          Get the data (wire format) into a byte array.
 byte getTag()
          Get the option's code tag.
 MessageType getType()
           
 void setData(byte[] messageType)
          Set the data (wire format) from a byte array.
 
Methods inherited from class org.apache.directory.server.dhcp.options.DhcpOption
getClassByTag, getTagByClass, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DhcpMessageType

public DhcpMessageType()

DhcpMessageType

public DhcpMessageType(MessageType type)
Method Detail

getTag

public byte getTag()
Description copied from class: DhcpOption
Get the option's code tag.

Specified by:
getTag in class DhcpOption
Returns:
byte

setData

public void setData(byte[] messageType)
Description copied from class: DhcpOption
Set the data (wire format) from a byte array. The default implementation just records the data as a byte array. Subclasses may parse the data into something more meaningful.

Overrides:
setData in class DhcpOption

getData

public byte[] getData()
Description copied from class: DhcpOption
Get the data (wire format) into a byte array. Subclasses must provide an implementation which serializes the parsed data back into a byte array if they override DhcpOption.setData(byte[]).

Overrides:
getData in class DhcpOption
Returns:
byte[]

getType

public MessageType getType()


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.