|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.util.Access
A class to handle access to ip ranges.
Field Summary | |
static int |
ADMIN
allowed to access metapages |
static int |
FTP
allowed to ftp |
static int |
GOPHER
allowed to run gopher |
static int |
HTTP
allowed to access standard http (ordinary webpages) |
static int |
HTTPS
allowed to run secure transactions |
static int |
NONE
No access at all |
static int |
WAIS
allowed to run wais |
Constructor Summary | |
Access(int type,
java.net.InetAddress lowipa,
java.net.InetAddress highipa)
Create a new Access with given ip-range and given type |
|
Access(java.lang.String type,
java.net.InetAddress lowip,
java.net.InetAddress highip)
Create a new Access with given ip-range and given type |
Method Summary | |
int |
getType()
return the accesstype we have for this range |
boolean |
inrange(java.net.InetAddress ia)
check if a given ip is in this accessrange |
void |
setType(int newType)
sets the accesstype we have for this range |
java.lang.String |
toString()
get the string representation of this access. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int NONE
public static int ADMIN
public static int HTTP
public static int HTTPS
public static int FTP
public static int GOPHER
public static int WAIS
Constructor Detail |
public Access(java.lang.String type, java.net.InetAddress lowip, java.net.InetAddress highip)
type
- one of http, admin, ftp, gopher, https, wais (caseinsensitive)lowip
- the lowest ip in the rangehighip
- the highest ip in the rangepublic Access(int type, java.net.InetAddress lowipa, java.net.InetAddress highipa)
type
- one of the constants (HTTP, FTP, ADMIN etc) or a OR (|) of them.Method Detail |
public boolean inrange(java.net.InetAddress ia)
ia
- the ip we are testing.
public int getType()
public void setType(int newType)
newType
- the new access for this range.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |