|
||||||||||
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int ADMIN
public static final int HTTP
public static final int HTTPS
public static final int FTP
public static final int GOPHER
public static final 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.lowipa
- the lowest ip in the rangehighipa
- the highest ip in the rangeMethod 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 |