net.jradius.handler.dhcp
Class AddressPoolImpl
java.lang.Object
net.jradius.handler.dhcp.AddressPoolImpl
- All Implemented Interfaces:
- Cloneable, AddressPool, net.sf.ehcache.event.CacheEventListener
public class AddressPoolImpl
- extends Object
- implements AddressPool, net.sf.ehcache.event.CacheEventListener
leaseFile
protected String leaseFile
network
protected InetAddress network
netmask
protected InetAddress netmask
router
protected InetAddress router
dns
protected 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(InetAddress network,
InetAddress netmask,
InetAddress router,
int leaseTime)
contains
public boolean contains(InetAddress ip)
nextIP
public InetAddress nextIP()
throws UnknownHostException
- Throws:
UnknownHostException
getIP
public InetAddress getIP(byte[] hwa,
InetAddress requested,
boolean forceNew)
throws UnknownHostException
- Specified by:
getIP
in interface AddressPool
- Throws:
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 Object clone()
throws CloneNotSupportedException
- Specified by:
clone
in interface net.sf.ehcache.event.CacheEventListener
- Overrides:
clone
in class Object
- Throws:
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(String leaseFile)
setLeases
public void setLeases(net.sf.ehcache.Cache leases)
setLeaseTime
public void setLeaseTime(int leaseTime)
setNetmask
public void setNetmask(InetAddress netmask)
setNetwork
public void setNetwork(InetAddress network)
setRouter
public void setRouter(InetAddress router)
getLeaseFile
public String getLeaseFile()
getLeases
public net.sf.ehcache.Ehcache getLeases()
getLeaseTime
public int getLeaseTime()
- Specified by:
getLeaseTime
in interface AddressPool
getNetmask
public InetAddress getNetmask()
- Specified by:
getNetmask
in interface AddressPool
getNetwork
public InetAddress getNetwork()
- Specified by:
getNetwork
in interface AddressPool
getRouter
public InetAddress getRouter()
- Specified by:
getRouter
in interface AddressPool
getDns
public InetAddress[] getDns()
- Specified by:
getDns
in interface AddressPool
setDns
public void setDns(InetAddress[] dns)
getListener
public AddressPoolListener getListener()
setListener
public void setListener(AddressPoolListener listener)
Copyright © 2011 Coova Technologies, LLC, All Rights Reserved.