Package com.biglybt.core.ipfilter.impl
Class IpFilterManagerImpl
- java.lang.Object
-
- com.biglybt.core.ipfilter.impl.IpFilterManagerImpl
-
- All Implemented Interfaces:
ParameterListener
,IpFilterManager
public class IpFilterManagerImpl extends java.lang.Object implements IpFilterManager, ParameterListener
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
lock
private java.io.RandomAccessFile
rafDescriptions
protected static IpFilterManagerImpl
singleton
-
Constructor Summary
Constructors Constructor Description IpFilterManagerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
addDescription(IpRange range, byte[] description)
void
cacheAllDescriptions()
void
clearDescriptionCache()
void
deleteAllDescriptions()
BadIps
getBadIps()
byte[]
getDescription(java.lang.Object info)
IpFilter
getIPFilter()
static IpFilterManager
getSingleton()
void
parameterChanged(java.lang.String parameterName)
Called, when a parameter has changed.
-
-
-
Field Detail
-
singleton
protected static final IpFilterManagerImpl singleton
-
lock
private java.lang.Object lock
-
rafDescriptions
private java.io.RandomAccessFile rafDescriptions
-
-
Method Detail
-
addDescription
public java.lang.Object addDescription(IpRange range, byte[] description)
- Specified by:
addDescription
in interfaceIpFilterManager
-
getDescription
public byte[] getDescription(java.lang.Object info)
- Specified by:
getDescription
in interfaceIpFilterManager
- Returns:
-
cacheAllDescriptions
public void cacheAllDescriptions()
- Specified by:
cacheAllDescriptions
in interfaceIpFilterManager
-
clearDescriptionCache
public void clearDescriptionCache()
- Specified by:
clearDescriptionCache
in interfaceIpFilterManager
-
deleteAllDescriptions
public void deleteAllDescriptions()
- Specified by:
deleteAllDescriptions
in interfaceIpFilterManager
-
getSingleton
public static IpFilterManager getSingleton()
-
getIPFilter
public IpFilter getIPFilter()
- Specified by:
getIPFilter
in interfaceIpFilterManager
-
getBadIps
public BadIps getBadIps()
- Specified by:
getBadIps
in interfaceIpFilterManager
-
parameterChanged
public void parameterChanged(java.lang.String parameterName)
Description copied from interface:ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChanged
in interfaceParameterListener
- Parameters:
parameterName
- the name of the parameter that has changed
-
-