|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.ac.Machine
public class Machine
A machine (representing an IP address).
Constructor Summary | |
---|---|
Machine(java.lang.String ip)
Creates a new machine object. |
Method Summary | |
---|---|
void |
addIPRange(IPRange range)
Adds an IP range to this machine. |
boolean |
equals(java.lang.Object otherObject)
|
Accreditable[] |
getAccreditables()
Returns the set of accreditables of this accreditable. |
java.net.InetAddress |
getAddress()
Returns the IP address. |
static java.net.InetAddress |
getAddress(java.lang.String string)
Deprecated. This method is unnecessary and does not work for IPv6. Use InetAddress.getByName(string) instead! |
java.lang.String |
getIp()
Returns the IP address. |
IPRange[] |
getIPRanges()
Returns the IP ranges this machine belongs to. |
int |
hashCode()
|
void |
setAddress(java.net.InetAddress _address)
Sets the IP address. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Machine(java.lang.String ip) throws AccessControlException
"129.168.0.32"
,
numeric IPv6 addresses like "1080::8:800:200C:417A"
as well as hostnames (if DNS resolution is available) like
"localhost"
or "www.apache.com"
.
ip
- a String
like "192.168.0.32"
,
"::1"
, ...
.
AccessControlException
- when the conversion of the
String
to an InetAddress
failedMethod Detail |
---|
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public Accreditable[] getAccreditables()
Accreditable
getAccreditables
in interface Accreditable
Accreditable.getAccreditables()
public java.lang.String getIp()
public static java.net.InetAddress getAddress(java.lang.String string) throws AccessControlException
InetAddress.getByName(string)
instead!
string
- The IP address, represented by a string.
AccessControlException
- when something went wrong.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.net.InetAddress getAddress()
public void setAddress(java.net.InetAddress _address)
_address
- An IP address.public void addIPRange(IPRange range)
range
- An IP range this machine belongs to.public IPRange[] getIPRanges()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |