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

java.lang.Object
  extended by org.apache.directory.server.dhcp.store.DhcpConfigElement
      extended by org.apache.directory.server.dhcp.store.Subnet

public class Subnet
extends DhcpConfigElement

The definition of a Subnet.

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

Field Summary
 
Fields inherited from class org.apache.directory.server.dhcp.store.DhcpConfigElement
PROPERTY_MAX_LEASE_TIME
 
Constructor Summary
Subnet(java.net.InetAddress address, java.net.InetAddress netmask, java.net.InetAddress rangeMin, java.net.InetAddress rangeMax)
           
 
Method Summary
 boolean contains(java.net.InetAddress clientAddress)
          Check whether the given client address resides within this subnet and possibly range.
 java.net.InetAddress getAddress()
           
 java.net.InetAddress getNetmask()
           
 java.net.InetAddress getRangeMax()
           
 java.net.InetAddress getRangeMin()
           
 boolean isInRange(java.net.InetAddress clientAddress)
          Check whether the specified address is within the range for this subnet.
 void setRangeMax(java.net.InetAddress rangeMax)
           
 void setRangeMin(java.net.InetAddress rangeMin)
           
 
Methods inherited from class org.apache.directory.server.dhcp.store.DhcpConfigElement
getOptions, getProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subnet

public Subnet(java.net.InetAddress address,
              java.net.InetAddress netmask,
              java.net.InetAddress rangeMin,
              java.net.InetAddress rangeMax)
Method Detail

getAddress

public java.net.InetAddress getAddress()

getNetmask

public java.net.InetAddress getNetmask()

getRangeMax

public java.net.InetAddress getRangeMax()

setRangeMax

public void setRangeMax(java.net.InetAddress rangeMax)

getRangeMin

public java.net.InetAddress getRangeMin()

setRangeMin

public void setRangeMin(java.net.InetAddress rangeMin)

contains

public boolean contains(java.net.InetAddress clientAddress)
Check whether the given client address resides within this subnet and possibly range.

Parameters:
clientAddress -
Returns:
boolean

isInRange

public boolean isInRange(java.net.InetAddress clientAddress)
Check whether the specified address is within the range for this subnet.

Parameters:
clientAddress -
Returns:
boolean


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