org.apache.lenya.ac
Interface IPRange

All Superinterfaces:
Accreditable, Groupable, Item, org.apache.avalon.framework.logger.LogEnabled

public interface IPRange
extends Accreditable, Item, Groupable

An IP range.


Method Summary
 boolean contains(Machine machine)
          Checks if this IP range contains a certain machine.
 void delete()
          Delete an IP range.
 java.net.InetAddress getNetworkAddress()
          Returns the network address.
 java.net.InetAddress getSubnetMask()
          Returns the subnet mask.
 void save()
          Save the IP range.
 void setNetworkAddress(byte[] address)
          Sets the network address.
 void setNetworkAddress(java.lang.String address)
          Sets the network address.
 void setSubnetMask(byte[] mask)
          Sets the subnet mask.
 void setSubnetMask(java.lang.String mask)
          Sets the subnet mask.
 
Methods inherited from interface org.apache.lenya.ac.Accreditable
getAccreditables
 
Methods inherited from interface org.apache.lenya.ac.Item
configure, getDescription, getId, getItemManager, getName, setDescription, setName
 
Methods inherited from interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
 
Methods inherited from interface org.apache.lenya.ac.Groupable
addedToGroup, getGroups, removedFromGroup, removeFromAllGroups
 

Method Detail

setNetworkAddress

void setNetworkAddress(java.lang.String address)
                       throws AccessControlException
Sets the network address.

Parameters:
address - A string, e.g. 192.168.0.32
Throws:
AccessControlException - when the conversion of the String to an InetAddress failed.

setNetworkAddress

void setNetworkAddress(byte[] address)
                       throws AccessControlException
Sets the network address.

Parameters:
address - A byte array of the length 4.
Throws:
AccessControlException - when the conversion of the byte array to an InetAddress failed.

getNetworkAddress

java.net.InetAddress getNetworkAddress()
Returns the network address.

Returns:
An InetAddress value.

setSubnetMask

void setSubnetMask(java.lang.String mask)
                   throws AccessControlException
Sets the subnet mask.

Parameters:
mask - A string, e.g. 192.168.0.32
Throws:
AccessControlException - when the conversion of the String to an InetAddress failed.

setSubnetMask

void setSubnetMask(byte[] mask)
                   throws AccessControlException
Sets the subnet mask.

Parameters:
mask - A byte array of the length 4.
Throws:
AccessControlException - when the conversion of the byte array to an InetAddress failed.

getSubnetMask

java.net.InetAddress getSubnetMask()
Returns the subnet mask.

Returns:
An InetAddress value.

contains

boolean contains(Machine machine)
Checks if this IP range contains a certain machine.

Parameters:
machine - The machine to check for.
Returns:
A boolean value.

save

void save()
          throws AccessControlException
Save the IP range.

Throws:
AccessControlException - if the save failed

delete

void delete()
            throws AccessControlException
Delete an IP range.

Throws:
AccessControlException - if the delete failed


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.