org.apache.directory.server.dhcp.store
Class SimpleDhcpStore

java.lang.Object
  extended by org.apache.directory.server.dhcp.store.AbstractDhcpStore
      extended by org.apache.directory.server.dhcp.store.SimpleDhcpStore
All Implemented Interfaces:
DhcpStore

public class SimpleDhcpStore
extends AbstractDhcpStore

Very simple dummy/proof-of-concept implementation of a DhcpStore.

Version:
$Rev: 545042 $, $Date: 2007-06-06 22:32:01 -0500 (Mi, 06 Jun 2007) $
Author:
Apache Directory Project

Constructor Summary
SimpleDhcpStore()
           
 
Method Summary
protected  Host findDesignatedHost(HardwareAddress hardwareAddress)
          Find a host to with the explicitely designated hardware address.
protected  Lease findExistingLease(HardwareAddress hardwareAddress, Lease existingLease)
          Find an existing lease in the store.
protected  Subnet findSubnet(java.net.InetAddress clientAddress)
          Find the subnet for the given client address.
protected  javax.naming.directory.DirContext getContext()
           
protected  OptionsField getOptions(DhcpConfigElement element)
          Return a list of all options applicable to the given config element.
protected  java.util.Map getProperties(DhcpConfigElement element)
          Return a list of all options applicable to the given config element.
 void updateLease(Lease lease)
          Update the (possibly changed) lease in the store.
 
Methods inherited from class org.apache.directory.server.dhcp.store.AbstractDhcpStore
getExistingLease, getLeaseOffer, releaseLease
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDhcpStore

public SimpleDhcpStore()
Method Detail

getContext

protected javax.naming.directory.DirContext getContext()
                                                throws javax.naming.NamingException
Throws:
javax.naming.NamingException

findExistingLease

protected Lease findExistingLease(HardwareAddress hardwareAddress,
                                  Lease existingLease)
Description copied from class: AbstractDhcpStore
Find an existing lease in the store.

Specified by:
findExistingLease in class AbstractDhcpStore
Parameters:
hardwareAddress -
existingLease -
Returns:
Lease

findDesignatedHost

protected Host findDesignatedHost(HardwareAddress hardwareAddress)
                           throws DhcpException
Description copied from class: AbstractDhcpStore
Find a host to with the explicitely designated hardware address.

Specified by:
findDesignatedHost in class AbstractDhcpStore
Parameters:
hardwareAddress -
Returns:
Host
Throws:
DhcpException

findSubnet

protected Subnet findSubnet(java.net.InetAddress clientAddress)
Find the subnet for the given client address.

Specified by:
findSubnet in class AbstractDhcpStore
Parameters:
clientAddress -
Returns:
Subnet

updateLease

public void updateLease(Lease lease)
Description copied from class: AbstractDhcpStore
Update the (possibly changed) lease in the store.

Specified by:
updateLease in class AbstractDhcpStore

getOptions

protected OptionsField getOptions(DhcpConfigElement element)
Description copied from class: AbstractDhcpStore
Return a list of all options applicable to the given config element. List list must contain the options specified for the element and all parent elements in an aggregated fashion. For instance, the options for a host must include the global default options, the options of classes the host is a member of, the host's group options and the host's options.

Specified by:
getOptions in class AbstractDhcpStore
Returns:
OptionsField

getProperties

protected java.util.Map getProperties(DhcpConfigElement element)
Description copied from class: AbstractDhcpStore
Return a list of all options applicable to the given config element. List list must contain the options specified for the element and all parent elements in an aggregated fashion. For instance, the options for a host must include the global default options, the options of classes the host is a member of, the host's group options and the host's options.

Specified by:
getProperties in class AbstractDhcpStore
Returns:
Map


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