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

java.lang.Object
  extended by org.apache.directory.server.dhcp.options.DhcpOption
Direct Known Subclasses:
AddressListOption, AddressOption, ByteOption, ClientIdentifier, DhcpMessageType, IntOption, NisPlusDomain, ParameterRequestList, PathMtuPlateauTable, PerformRouterDiscovery, ShortOption, StaticRoute, StringOption, UnrecognizedOption, VendorSpecificInformation

public abstract class DhcpOption
extends java.lang.Object

The Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCP/IP network. Configuration parameters and other control information are carried in tagged data items that are stored in the 'options' field of the DHCP message. The data items themselves are also called "options."

Version:
$Rev: 642496 $, $Date: 2008-03-29 04:09:22 +0100 (Sa, 29 M??r 2008) $
Author:
Apache Directory Project

Constructor Summary
DhcpOption()
           
 
Method Summary
static java.lang.Class getClassByTag(int tag)
           
 byte[] getData()
          Get the data (wire format) into a byte array.
abstract  byte getTag()
          Get the option's code tag.
static int getTagByClass(java.lang.Class c)
           
 void setData(byte[] data)
          Set the data (wire format) from a byte array.
 void writeTo(java.nio.ByteBuffer out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DhcpOption

public DhcpOption()
Method Detail

getClassByTag

public static java.lang.Class getClassByTag(int tag)

getTagByClass

public static int getTagByClass(java.lang.Class c)

getTag

public abstract byte getTag()
Get the option's code tag.

Returns:
byte

setData

public void setData(byte[] data)
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.

Parameters:
data -

getData

public byte[] getData()
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 setData(byte[]).

Returns:
byte[]

writeTo

public final void writeTo(java.nio.ByteBuffer out)


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