org.apache.directory.server.dhcp.store
Interface DhcpStore

All Known Implementing Classes:
AbstractDhcpStore, SimpleDhcpStore

public interface DhcpStore

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

Method Summary
 Lease getExistingLease(HardwareAddress hardwareAddress, java.net.InetAddress requestedAddress, java.net.InetAddress selectionBase, long requestedLeaseTime, OptionsField options)
          Retrieve an existing lease from the dhcp store.
 Lease getLeaseOffer(HardwareAddress hardwareAddress, java.net.InetAddress requestedAddress, java.net.InetAddress selectionBase, long requestedLeaseTime, OptionsField options)
          Find a lease to offer in response to a DHCPDISCOVER request.
 void releaseLease(Lease lease)
          Release the specified lease.
 

Method Detail

getLeaseOffer

Lease getLeaseOffer(HardwareAddress hardwareAddress,
                    java.net.InetAddress requestedAddress,
                    java.net.InetAddress selectionBase,
                    long requestedLeaseTime,
                    OptionsField options)
                    throws DhcpException
Find a lease to offer in response to a DHCPDISCOVER request.

The lease to offer should be determined by an algorithme like the following:

If the requestedLeaseTime is >= 0, the validity duration of the returned lease must be updated, so that the lease is valid for at least the specified time. The duration may, however, be constrained by a configured maximum lease time.

Parameters:
hardwareAddress - hardwareAddress the hardware address of the client requesting the lease.
requestedAddress - the address requested by the client or null if the client did not request a specific address.
selectionBase - the address on which to base the selection of a lease from a pool, i.e. either the address of the interface on which the request was received or the address of a DHCP relay agent.
requestedLeaseTime - the lease time in milliseconds as requested by the client, or -1 if the client did not request a specific lease time.
options - the supplied DHCP options. Lease selection may be refined by using those options
Returns:
a lease or null if no matching lease was found.
Throws:
DhcpException

getExistingLease

Lease getExistingLease(HardwareAddress hardwareAddress,
                       java.net.InetAddress requestedAddress,
                       java.net.InetAddress selectionBase,
                       long requestedLeaseTime,
                       OptionsField options)
                       throws DhcpException
Retrieve an existing lease from the dhcp store.

Parameters:
hardwareAddress -
requestedAddress -
selectionBase -
requestedLeaseTime -
options -
Returns:
Lease
Throws:
DhcpException

releaseLease

void releaseLease(Lease lease)
Release the specified lease.

Parameters:
lease -


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