Methods Summary |
---|
public void | addRange(IPRange range)
if ( !(range instanceof IPRangeImpl )){
throw( new RuntimeException( "range must be created by createRange"));
}
filter.addRange(((IPRangeImpl)range).getRange());
|
public void | ban(java.lang.String IPAddress, java.lang.String text)
filter.ban( IPAddress, text, false );
|
public void | block(java.lang.String IPAddress)
filter.ban( IPAddress, "<plugin>", false );
|
public IPRange | createAndAddRange(java.lang.String description, java.lang.String start_ip, java.lang.String end_ip, boolean this_session_only)
IPRange range = createRange( this_session_only );
range.setDescription( description );
range.setStartIP( start_ip );
range.setEndIP( end_ip );
range.checkValid();
if ( range.isValid()){
addRange( range );
return( range );
}
return( null );
|
public IPRange | createRange(boolean this_session_only)
return( new IPRangeImpl( this, filter.createRange( this_session_only )));
|
public IPBanned[] | getBannedIPs()
BannedIp[] l = filter.getBannedIps();
IPBanned[] res = new IPBanned[l.length];
for (int i=0;i<l.length;i++){
res[i] = new IPBannedImpl(l[i]);
}
return( res );
|
public IPBlocked[] | getBlockedIPs()
BlockedIp[] l = filter.getBlockedIps();
IPBlocked[] res = new IPBlocked[l.length];
for (int i=0;i<l.length;i++){
res[i] = new IPBlockedImpl(this,l[i]);
}
return( res );
|
public java.io.File | getFile()
return( filter.getFile());
|
public boolean | getInRangeAddressesAreAllowed()
return( filter.getInRangeAddressesAreAllowed());
|
public long | getLastUpdateTime()
return( filter.getLastUpdateTime());
|
public int | getNumberOfBannedIPs()
return( filter.getNbBannedIps());
|
public int | getNumberOfBlockedIPs()
return( filter.getNbIpsBlocked());
|
public int | getNumberOfRanges()
return( filter.getNbRanges());
|
public IPRange[] | getRanges()
IpRange[] l = filter.getRanges();
IPRange[] res = new IPRange[l.length];
for (int i=0;i<l.length;i++){
res[i] = new IPRangeImpl(this, l[i]);
}
return( res );
|
public boolean | isEnabled()
return( filter.isEnabled());
|
public boolean | isInRange(java.lang.String IPAddress)
return( filter.isInRange(IPAddress));
|
public void | markAsUpToDate()
filter.markAsUpToDate();
|
public void | reload()
try{
filter.reload();
}catch( Throwable e ){
throw( new IPFilterException( "IPFilter::reload fails", e ));
}
|
public void | removeRange(IPRange range)
if ( !(range instanceof IPRangeImpl )){
throw( new RuntimeException( "range must be created by createRange"));
}
filter.removeRange(((IPRangeImpl)range).getRange());
|
public void | save()
try{
filter.save();
}catch( Throwable e ){
throw( new IPFilterException( "IPFilter::reload fails", e ));
}
|
public void | setEnabled(boolean enabled)
filter.setEnabled( enabled );
|
public void | setInRangeAddressesAreAllowed(boolean b)
filter.setInRangeAddressesAreAllowed( b );
|
public void | unban(java.lang.String IPAddress)
filter.unban( IPAddress );
|