|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.dhcp.store.AbstractDhcpStore
public abstract class AbstractDhcpStore
Abstract base implementation of a DhcpStore.
| Constructor Summary | |
|---|---|
AbstractDhcpStore()
|
|
| Method Summary | |
|---|---|
protected abstract Host |
findDesignatedHost(HardwareAddress hardwareAddress)
Find a host to with the explicitely designated hardware address. |
protected abstract Lease |
findExistingLease(HardwareAddress hardwareAddress,
Lease existingLease)
Find an existing lease in the store. |
protected abstract Subnet |
findSubnet(java.net.InetAddress clientAddress)
Find the subnet definition matching the given address. |
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. |
protected abstract OptionsField |
getOptions(DhcpConfigElement element)
Return a list of all options applicable to the given config element. |
protected abstract java.util.Map |
getProperties(DhcpConfigElement element)
Return a list of all options applicable to the given config element. |
void |
releaseLease(Lease lease)
Release the specified lease. |
protected abstract void |
updateLease(Lease lease)
Update the (possibly changed) lease in the store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDhcpStore()
| Method Detail |
|---|
public Lease getLeaseOffer(HardwareAddress hardwareAddress,
java.net.InetAddress requestedAddress,
java.net.InetAddress selectionBase,
long requestedLeaseTime,
OptionsField options)
throws DhcpException
DhcpStoreThe 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.
getLeaseOffer in interface DhcpStorehardwareAddress - 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
null if no matching lease was found.
DhcpException
public Lease getExistingLease(HardwareAddress hardwareAddress,
java.net.InetAddress requestedAddress,
java.net.InetAddress selectionBase,
long requestedLeaseTime,
OptionsField options)
throws DhcpException
DhcpStore
getExistingLease in interface DhcpStoreDhcpExceptionpublic void releaseLease(Lease lease)
DhcpStore
releaseLease in interface DhcpStoreprotected abstract void updateLease(Lease lease)
lease - protected abstract OptionsField getOptions(DhcpConfigElement element)
element -
protected abstract java.util.Map getProperties(DhcpConfigElement element)
element -
protected abstract Lease findExistingLease(HardwareAddress hardwareAddress,
Lease existingLease)
hardwareAddress - existingLease -
protected abstract Host findDesignatedHost(HardwareAddress hardwareAddress)
throws DhcpException
hardwareAddress -
DhcpExceptionprotected abstract Subnet findSubnet(java.net.InetAddress clientAddress)
clientAddress -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||