Methods Summary |
---|
public RPReply | _process(RPRequest request)
String method = request.getMethod();
Object[] params = request.getParams();
if ( method.equals( "createAndAddRange[String,String,String,boolean]")){
IPRange range = delegate.createAndAddRange(
(String)params[0],
(String)params[1],
(String)params[2],
((Boolean)params[3]).booleanValue());
if ( range == null ){
return( new RPReply(null));
}else{
RPIPRange rp_range = RPIPRange.create( range );
return( new RPReply( rp_range ));
}
}else if ( method.equals( "getRanges")){
IPRange[] ranges = delegate.getRanges();
RPIPRange[] rp_ranges = new RPIPRange[ranges.length];
for (int i=0;i<ranges.length;i++){
rp_ranges[i] = RPIPRange.create( ranges[i] );
}
return( new RPReply( rp_ranges ));
}else if ( method.equals( "save" )){
try{
delegate.save();
return(null );
}catch( IPFilterException e ){
return( new RPReply( e ));
}
}else if ( method.equals( "getInRangeAddressesAreAllowed")){
return( new RPReply( new Boolean( delegate.getInRangeAddressesAreAllowed())));
}else if ( method.equals( "setInRangeAddressesAreAllowed[boolean]")){
delegate.setInRangeAddressesAreAllowed(((Boolean)params[0]).booleanValue());
return( null );
}else if ( method.equals( "isEnabled")){
return( new RPReply( new Boolean( delegate.isEnabled())));
}else if ( method.equals( "setEnabled[boolean]")){
delegate.setEnabled(((Boolean)params[0]).booleanValue());
return( null );
}else if ( method.equals( "isInRange[String]")){
return( new RPReply( new Boolean( delegate.isInRange((String)params[0]))));
}
throw( new RPException( "Unknown method: " + method ));
|
protected void | _setDelegate(java.lang.Object _delegate)
delegate = (IPFilter)_delegate;
last_update_time = delegate.getLastUpdateTime();
number_of_ranges = delegate.getNumberOfRanges();
number_of_blocked_ips = delegate.getNumberOfBlockedIPs();
|
public java.lang.Object | _setLocal()
return( _fixupLocal());
|
public void | addRange(IPRange range)
notSupported();
|
public void | ban(java.lang.String IPAddress, java.lang.String text)
notSupported();
|
public void | block(java.lang.String IPAddress)
notSupported();
|
public static IPFilter | create(IPFilter _delegate)
RPIPFilter res =(RPIPFilter)_lookupLocal( _delegate );
if ( res == null ){
res = new RPIPFilter( _delegate );
}
return( res );
|
public IPRange | createAndAddRange(java.lang.String description, java.lang.String start_ip, java.lang.String end_ip, boolean this_session_only)
RPIPRange resp = (RPIPRange)_dispatcher.dispatch(
new RPRequest(
this,
"createAndAddRange[String,String,String,boolean]",
new Object[]{description,start_ip,end_ip,new Boolean(this_session_only)})).getResponse();
resp._setRemote( _dispatcher );
return( resp );
|
public IPRange | createRange(boolean this_session_only)
notSupported();
return( null );
|
public IPBanned[] | getBannedIPs()
notSupported();
return( null );
|
public IPBlocked[] | getBlockedIPs()
notSupported();
return( null );
|
public java.io.File | getFile()
notSupported();
return( null );
|
public boolean | getInRangeAddressesAreAllowed()
Boolean res = (Boolean)_dispatcher.dispatch( new RPRequest( this, "getInRangeAddressesAreAllowed", null )).getResponse();
return( res.booleanValue());
|
public long | getLastUpdateTime()
return( last_update_time );
|
public int | getNumberOfBannedIPs()
notSupported();
return -1;
|
public int | getNumberOfBlockedIPs()
return( number_of_blocked_ips );
|
public int | getNumberOfRanges()
return( number_of_ranges );
|
public IPRange[] | getRanges()
RPIPRange[] resp = (RPIPRange[])_dispatcher.dispatch(
new RPRequest(
this,
"getRanges",
null)).getResponse();
for (int i=0;i<resp.length;i++){
resp[i]._setRemote( _dispatcher );
}
return( resp );
|
public boolean | isEnabled()
Boolean res = (Boolean)_dispatcher.dispatch( new RPRequest( this, "isEnabled", null )).getResponse();
return( res.booleanValue());
|
public boolean | isInRange(java.lang.String IPAddress)
Boolean res = (Boolean)_dispatcher.dispatch( new RPRequest( this, "isInRange[String]", new Object[]{IPAddress})).getResponse();
return( res.booleanValue());
|
public void | markAsUpToDate()
notSupported();
|
public void | reload()
notSupported();
|
public void | removeRange(IPRange range)
notSupported();
|
public void | save()
try{
_dispatcher.dispatch( new RPRequest( this, "save", null )).getResponse();
}catch( RPException e ){
if ( e.getCause() instanceof IPFilterException ){
throw((IPFilterException)e.getCause());
}
throw( e );
}
|
public void | setEnabled(boolean value)
_dispatcher.dispatch( new RPRequest( this, "setEnabled[boolean]", new Object[]{new Boolean(value)} )).getResponse();
|
public void | setInRangeAddressesAreAllowed(boolean value)
_dispatcher.dispatch( new RPRequest( this, "setInRangeAddressesAreAllowed[boolean]", new Object[]{new Boolean(value)} )).getResponse();
|
public void | unban(java.lang.String IPAddress)
notSupported();
|