public class QueryHandler extends Object
| Constructor and Description |
|---|
QueryHandler(RblServer server) |
| Modifier and Type | Method and Description |
|---|---|
static String |
getKeyForAddress(String address,
String domain)
To speed up lookups, RBLs are stored as Hashmaps.
|
protected String |
preprocess(InetAddress source,
String queryValue)
This method checks for any actions, which may be contained in the
query-value.
|
Response |
process(InetAddress source,
Query q) |
public QueryHandler(RblServer server)
public Response process(InetAddress source, Query q)
protected String preprocess(InetAddress source, String queryValue)
This method checks for any actions, which may be contained in the query-value. The actions are processed and removed from the query-value, yielding the final block-entry key.
source - The source address from which this query has been sentquery - The query value of the DNS querypublic static String getKeyForAddress(String address, String domain)
To speed up lookups, RBLs are stored as Hashmaps. Usually, queries contain an address value in the form
1.0.16.172.rbl.localnet
This method will convert addresses like 172.16.0.1 into this reversed format
and append the specified domain.
If the address already ends with the given domain, this method assumes the address value to already match the reversed format and will simply return it as is.
address - domain - Copyright © 2013. All Rights Reserved.