public class IPSettings extends Object
Constructor and Description |
---|
IPSettings() |
Modifier and Type | Method and Description |
---|---|
IPRangeNode |
get(InetAddress addr)
returns a single, best matching node for the given address
|
List<IPRangeNode> |
getChain(InetAddress iaddr)
returns a List of all the nodes (from root to best matching) for the given address
|
Map |
getNodeSettings(InetAddress addr)
returns the settings for a single (non-cumulative) node that best matches the given address
|
Map |
getNodeSettings(String addr)
returns the settings for a single (non-cumulative) node that best matches the given address
|
Map |
getSettings(InetAddress iaddr)
returns the cumulative settings for a given address
|
Map |
getSettings(String addr)
returns the cumulative settings for a given address
|
int |
getVersion() |
static boolean |
isV4(InetAddress addr)
returns true if the value is an IPv4 address
|
static boolean |
isV6(InetAddress addr)
returns true if the value is an IPv6 address
|
void |
put(IPRangeNode<Map> ipr)
calls put( IPRangeNode ipr )
|
void |
put(IPRangeNode<Map> ipr,
boolean doCheck)
all added data should go through this method
|
void |
putAll(List<IPRangeNode<Map>> children)
puts all the children at the IPv4 or IPv6 nodes for fast insertion.
|
void |
putSettings(String addr,
Map settings) |
void |
putSettings(String lower,
String upper,
Map settings) |
public IPSettings()
public void put(IPRangeNode<Map> ipr, boolean doCheck)
ipr
- doCheck
- public void put(IPRangeNode<Map> ipr)
public void putAll(List<IPRangeNode<Map>> children)
children
- public void putSettings(String lower, String upper, Map settings) throws UnknownHostException
UnknownHostException
public void putSettings(String addr, Map settings) throws UnknownHostException
UnknownHostException
public IPRangeNode get(InetAddress addr)
addr
- public List<IPRangeNode> getChain(InetAddress iaddr)
iaddr
- public Map getSettings(InetAddress iaddr)
iaddr
- public Map getSettings(String addr)
addr
- public Map getNodeSettings(InetAddress addr)
addr
- public Map getNodeSettings(String addr)
addr
- public int getVersion()
public static boolean isV4(InetAddress addr)
public static boolean isV6(InetAddress addr)
Copyright © 2015 Lucee