net.jradius.handler.dhcp
Class AddressPoolImpl
java.lang.Object
net.jradius.handler.dhcp.AddressPoolImpl
- All Implemented Interfaces:
- java.lang.Cloneable, AddressPool, net.sf.ehcache.event.CacheEventListener
public class AddressPoolImpl
- extends java.lang.Object
- implements AddressPool, net.sf.ehcache.event.CacheEventListener
Constructor Summary |
AddressPoolImpl()
|
AddressPoolImpl(java.net.InetAddress network,
java.net.InetAddress netmask,
java.net.InetAddress router,
int leaseTime)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
leaseFile
protected java.lang.String leaseFile
network
protected java.net.InetAddress network
netmask
protected java.net.InetAddress netmask
router
protected java.net.InetAddress router
dns
protected java.net.InetAddress[] dns
next
protected byte next
fudge
protected int fudge
leaseTime
protected int leaseTime
listener
protected AddressPoolListener listener
leases
protected net.sf.ehcache.Cache leases
AddressPoolImpl
public AddressPoolImpl()
AddressPoolImpl
public AddressPoolImpl(java.net.InetAddress network,
java.net.InetAddress netmask,
java.net.InetAddress router,
int leaseTime)
contains
public boolean contains(java.net.InetAddress ip)
nextIP
public java.net.InetAddress nextIP()
throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
getIP
public java.net.InetAddress getIP(byte[] hwa,
java.net.InetAddress requested,
boolean forceNew)
throws java.net.UnknownHostException
- Specified by:
getIP
in interface AddressPool
- Throws:
java.net.UnknownHostException
writeLeaseFile
public void writeLeaseFile()
notifyElementEvicted
public void notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element e)
- Specified by:
notifyElementEvicted
in interface net.sf.ehcache.event.CacheEventListener
notifyElementExpired
public void notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element e)
- Specified by:
notifyElementExpired
in interface net.sf.ehcache.event.CacheEventListener
notifyElementPut
public void notifyElementPut(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element e)
throws net.sf.ehcache.CacheException
- Specified by:
notifyElementPut
in interface net.sf.ehcache.event.CacheEventListener
- Throws:
net.sf.ehcache.CacheException
notifyElementRemoved
public void notifyElementRemoved(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element e)
throws net.sf.ehcache.CacheException
- Specified by:
notifyElementRemoved
in interface net.sf.ehcache.event.CacheEventListener
- Throws:
net.sf.ehcache.CacheException
notifyElementUpdated
public void notifyElementUpdated(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element e)
throws net.sf.ehcache.CacheException
- Specified by:
notifyElementUpdated
in interface net.sf.ehcache.event.CacheEventListener
- Throws:
net.sf.ehcache.CacheException
notifyRemoveAll
public void notifyRemoveAll(net.sf.ehcache.Ehcache cache)
- Specified by:
notifyRemoveAll
in interface net.sf.ehcache.event.CacheEventListener
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface net.sf.ehcache.event.CacheEventListener
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
dispose
public void dispose()
- Specified by:
dispose
in interface net.sf.ehcache.event.CacheEventListener
setFudge
public void setFudge(int fudge)
setLeaseFile
public void setLeaseFile(java.lang.String leaseFile)
setLeases
public void setLeases(net.sf.ehcache.Cache leases)
setLeaseTime
public void setLeaseTime(int leaseTime)
setNetmask
public void setNetmask(java.net.InetAddress netmask)
setNetwork
public void setNetwork(java.net.InetAddress network)
setRouter
public void setRouter(java.net.InetAddress router)
getLeaseFile
public java.lang.String getLeaseFile()
getLeases
public net.sf.ehcache.Ehcache getLeases()
getLeaseTime
public int getLeaseTime()
- Specified by:
getLeaseTime
in interface AddressPool
getNetmask
public java.net.InetAddress getNetmask()
- Specified by:
getNetmask
in interface AddressPool
getNetwork
public java.net.InetAddress getNetwork()
- Specified by:
getNetwork
in interface AddressPool
getRouter
public java.net.InetAddress getRouter()
- Specified by:
getRouter
in interface AddressPool
getDns
public java.net.InetAddress[] getDns()
- Specified by:
getDns
in interface AddressPool
setDns
public void setDns(java.net.InetAddress[] dns)
getListener
public AddressPoolListener getListener()
setListener
public void setListener(AddressPoolListener listener)
Copyright © 2008 JRadius Project, All Rights Reserved.