|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gudy.azureus2.pluginsimpl.remote.RPObject
org.gudy.azureus2.pluginsimpl.remote.ipfilter.RPIPFilter
public class RPIPFilter
Field Summary | |
---|---|
protected IPFilter |
delegate
|
long |
last_update_time
|
int |
number_of_blocked_ips
|
int |
number_of_ranges
|
Fields inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject |
---|
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverse |
Constructor Summary | |
---|---|
protected |
RPIPFilter(IPFilter _delegate)
|
Method Summary | |
---|---|
RPReply |
_process(RPRequest request)
|
protected void |
_setDelegate(java.lang.Object _delegate)
|
java.lang.Object |
_setLocal()
|
void |
addRange(IPRange range)
Adds a range. |
void |
ban(java.lang.String IPAddress,
java.lang.String text)
Explicitly bans an address |
void |
block(java.lang.String IPAddress)
Explicitly blocks an address |
static IPFilter |
create(IPFilter _delegate)
|
IPRange |
createAndAddRange(java.lang.String description,
java.lang.String start_ip,
java.lang.String end_ip,
boolean this_session_only)
Creates, validates and adds a range |
IPRange |
createRange(boolean this_session_only)
creates a new range but *doesn't* add it to the list. |
IPBanned[] |
getBannedIPs()
Gets the current list of b addresses |
IPBlocked[] |
getBlockedIPs()
Gets the current list of blocked addresses |
java.io.File |
getFile()
Gets the file name used for persistent ranges |
boolean |
getInRangeAddressesAreAllowed()
The filter either allows defined ranges to be allowed or denied access |
long |
getLastUpdateTime()
Gets the last time the filter set was updated or marked as up to date |
int |
getNumberOfBannedIPs()
returns length of banned ip list |
int |
getNumberOfBlockedIPs()
returns length of blocked ip list |
int |
getNumberOfRanges()
returns length of ranges list |
IPRange[] |
getRanges()
Gets the current set of defined IP ranges |
boolean |
isEnabled()
Test if ipfilter is enabled or not |
boolean |
isInRange(java.lang.String IPAddress)
Checks an address to see if its in an allowed range |
void |
markAsUpToDate()
Marks the IPFilter set as being uptodate |
void |
reload()
Reloads the ip filter from the config file (obtainable using "getFile") |
void |
removeRange(IPRange range)
Remove a range |
void |
save()
saves current setting to file given by getFile |
void |
setEnabled(boolean value)
change the enabled status |
void |
setInRangeAddressesAreAllowed(boolean value)
Set the behaviour of the filter to either allow or deny access for defined ranges |
void |
unban(java.lang.String IPAddress)
Removes a ban on an address |
Methods inherited from class org.gudy.azureus2.pluginsimpl.remote.RPObject |
---|
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, _setRemote, getDispatcher, notSupported, notSupported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient IPFilter delegate
public long last_update_time
public int number_of_ranges
public int number_of_blocked_ips
Constructor Detail |
---|
protected RPIPFilter(IPFilter _delegate)
Method Detail |
---|
public static IPFilter create(IPFilter _delegate)
protected void _setDelegate(java.lang.Object _delegate)
_setDelegate
in class RPObject
public java.lang.Object _setLocal() throws RPException
_setLocal
in class RPObject
RPException
public RPReply _process(RPRequest request)
_process
in class RPObject
public java.io.File getFile()
IPFilter
getFile
in interface IPFilter
public IPRange createRange(boolean this_session_only)
IPFilter
createRange
in interface IPFilter
this_session_only
- // not persisted if "this_session_only" is true
public void addRange(IPRange range)
IPFilter
addRange
in interface IPFilter
public IPRange createAndAddRange(java.lang.String description, java.lang.String start_ip, java.lang.String end_ip, boolean this_session_only)
IPFilter
createAndAddRange
in interface IPFilter
this_session_only
- not persisted if true
public void removeRange(IPRange range)
IPFilter
removeRange
in interface IPFilter
public void reload() throws IPFilterException
IPFilter
reload
in interface IPFilter
IPFilterException
public IPRange[] getRanges()
IPFilter
getRanges
in interface IPFilter
public boolean isInRange(java.lang.String IPAddress)
IPFilter
isInRange
in interface IPFilter
public IPBlocked[] getBlockedIPs()
IPFilter
getBlockedIPs
in interface IPFilter
public void block(java.lang.String IPAddress)
IPFilter
block
in interface IPFilter
public IPBanned[] getBannedIPs()
IPFilter
getBannedIPs
in interface IPFilter
public void ban(java.lang.String IPAddress, java.lang.String text)
IPFilter
ban
in interface IPFilter
public void unban(java.lang.String IPAddress)
IPFilter
unban
in interface IPFilter
public boolean getInRangeAddressesAreAllowed()
IPFilter
getInRangeAddressesAreAllowed
in interface IPFilter
public void setInRangeAddressesAreAllowed(boolean value)
IPFilter
setInRangeAddressesAreAllowed
in interface IPFilter
public boolean isEnabled()
IPFilter
isEnabled
in interface IPFilter
public void setEnabled(boolean value)
IPFilter
setEnabled
in interface IPFilter
public void save() throws IPFilterException
IPFilter
save
in interface IPFilter
IPFilterException
public void markAsUpToDate()
IPFilter
markAsUpToDate
in interface IPFilter
public long getLastUpdateTime()
IPFilter
getLastUpdateTime
in interface IPFilter
public int getNumberOfRanges()
IPFilter
getNumberOfRanges
in interface IPFilter
public int getNumberOfBlockedIPs()
IPFilter
getNumberOfBlockedIPs
in interface IPFilter
public int getNumberOfBannedIPs()
IPFilter
getNumberOfBannedIPs
in interface IPFilter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |