FileDocCategorySizeDatePackage
IPFilter.javaAPI DocAzureus 3.0.3.44233Mon Jan 08 09:59:14 GMT 2007org.gudy.azureus2.plugins.ipfilter

IPFilter

public interface IPFilter
author
parg

Fields Summary
Constructors Summary
Methods Summary
public voidaddRange(IPRange range)
Adds a range. Only ranges created with "create" above can be added

param
range

public voidban(java.lang.String IPAddress, java.lang.String text)
Explicitly bans an address

param
IPAddress
since
2.5.0.2

public voidblock(java.lang.String IPAddress)
Explicitly blocks an address

param
IPAddress

public IPRangecreateAndAddRange(java.lang.String description, java.lang.String start_ip, java.lang.String end_ip, boolean this_session_only)
Creates, validates and adds a range

param
description
param
start_ip
param
end_ip
param
this_session_only not persisted if true
return
new range or null if invalid

public IPRangecreateRange(boolean this_session_only)
creates a new range but *doesn't* add it to the list. Use the add method to add it

param
this_session_only // not persisted if "this_session_only" is true
return

public IPBanned[]getBannedIPs()
Gets the current list of b addresses

since
2.5.0.2
return

public IPBlocked[]getBlockedIPs()
Gets the current list of blocked addresses

return

public java.io.FilegetFile()
Gets the file name used for persistent ranges

return

public booleangetInRangeAddressesAreAllowed()
The filter either allows defined ranges to be allowed or denied access

return

public longgetLastUpdateTime()
Gets the last time the filter set was updated or marked as up to date

return

public intgetNumberOfBannedIPs()
returns length of banned ip list

since
2.5.0.2
return

public intgetNumberOfBlockedIPs()
returns length of blocked ip list

return

public intgetNumberOfRanges()
returns length of ranges list

return

public IPRange[]getRanges()
Gets the current set of defined IP ranges

return

public booleanisEnabled()
Test if ipfilter is enabled or not

return

public booleanisInRange(java.lang.String IPAddress)
Checks an address to see if its in an allowed range

param
IPAddress
return

public voidmarkAsUpToDate()
Marks the IPFilter set as being uptodate

public voidreload()
Reloads the ip filter from the config file (obtainable using "getFile")

throws
IPFilterException

public voidremoveRange(IPRange range)
Remove a range

param
range

public voidsave()
saves current setting to file given by getFile

throws
IPFilterException

public voidsetEnabled(boolean enabled)
change the enabled status

param
enabled

public voidsetInRangeAddressesAreAllowed(boolean b)
Set the behaviour of the filter to either allow or deny access for defined ranges

param
b

public voidunban(java.lang.String IPAddress)
Removes a ban on an address

param
IPAddress
since
2.5.0.2