|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IPFilter
Defines an interface to find out if an IP address is banned.
| Nested Class Summary | |
|---|---|
static interface |
IPFilter.IPFilterCallback
Defines an interface for loading IP Filters through a callback. |
| Method Summary | |
|---|---|
boolean |
allow(Address address)
Checks if the address is of type Connectable and checks
if the ip address is banned. |
boolean |
allow(byte[] addr)
Checks if a given host is banned. |
boolean |
allow(IP ip)
Checks if a given host is banned. |
boolean |
allow(SocketAddress addr)
Checks if a given host is banned. |
boolean |
allow(String addr)
Checks if a given host is banned. |
boolean |
hasBlacklistedHosts()
|
int |
logMinDistanceTo(IP ip)
Calculates the first set bit in the distance between an IPv4 address and the ranges represented by this list. |
void |
refreshHosts()
Updates the hosts in the IP filter. |
void |
refreshHosts(IPFilter.IPFilterCallback callback)
|
| Methods inherited from interface com.limegroup.gnutella.filters.SpamFilter |
|---|
allow |
| Method Detail |
|---|
void refreshHosts(IPFilter.IPFilterCallback callback)
boolean hasBlacklistedHosts()
int logMinDistanceTo(IP ip)
ip - an IPv4 address, represented as an IP object with a /32 netmask.
boolean allow(IP ip)
ip - address in the form of A.B.C.D, but if
it is a DNS name then a lookup will be performed.
boolean allow(SocketAddress addr)
addr - an IP in the form of A.B.C.D, but if
it is a DNS name then a lookup will be performed.
boolean allow(String addr)
addr - an IP in the form of A.B.C.D, but if
it is a DNS name then a lookup will be performed.
boolean allow(Address address)
Connectable and checks
if the ip address is banned.
Can be extended to handle other address types if they have the notion
of a public/unique ip address.
boolean allow(byte[] addr)
addr - an IP in the form of A.B.C.D, but if
it is a DNS name then a lookup will be performed.
void refreshHosts()
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||