public class IPAccessHandler extends AbstractHttpHandler
Constructor and Description |
---|
IPAccessHandler()
Constructor for the class
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkIP(java.lang.String ipstring)
Checks if the given ipstring (x.x.x.x) is authorized or not
|
void |
handle(java.lang.String pathInContext,
java.lang.String pathParams,
HttpRequest request,
HttpResponse response)
Handles the incoming request
|
void |
setAllowIP(java.lang.String ipstring)
Allow the given ip-address access
|
void |
setDenyIP(java.lang.String ipstring)
Deny the given ip-address access
|
void |
setStandard(java.lang.String s)
Set the standard action beeing taken when not registred IPs wants access
|
getHttpContext, getName, handleTrace, initialize, isStarted, setName, start, stop, toString
public boolean checkIP(java.lang.String ipstring)
ipstring
- The ip-address as a Stringpublic void handle(java.lang.String pathInContext, java.lang.String pathParams, HttpRequest request, HttpResponse response) throws HttpException, java.io.IOException
pathInContext
- pathParams
- request
- The incoming HTTP-requestresponse
- The outgoing HTTP-responseHttpException
java.io.IOException
public void setAllowIP(java.lang.String ipstring)
ipstring
- The ip-address as a String on the format "x.x.x.x"public void setDenyIP(java.lang.String ipstring)
ipstring
- The ip-address as a String on the format "x.x.x.x"public void setStandard(java.lang.String s)
s
- The standard-string (either 'allow' or 'deny')Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.