org.jnetpcap.util.resolver
Class IpResolver
java.lang.Object
org.jnetpcap.util.resolver.AbstractResolver
org.jnetpcap.util.resolver.IpResolver
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, Resolver
public class IpResolver
- extends AbstractResolver
A resolver object that knows how to convert IP addresses into hostnames.
- Author:
- Mark Bednarczyk, Sly Technologies, Inc.
|
Method Summary |
java.lang.String |
resolveToName(byte[] address,
long hash)
Resolves an address to a name. |
protected java.lang.String |
resolveToName(long number,
long hash)
Resolves number to a name. |
long |
toHashCode(byte[] address)
|
| Methods inherited from class org.jnetpcap.util.resolver.AbstractResolver |
addToCache, addToCache, canBeResolved, clearCache, finalize, getCacheCapacity, getCacheLoadFactor, getNegativeTimeout, getPositiveTimeout, hasCacheFile, initializeIfNeeded, isCached, loadCache, loadCache, loadCache, propertyChange, resolve, saveCache, saveCache, setCacheCapacity, setCacheLoadFactor, setNegativeTimeout, setPositiveTimeout, toHashCode, toString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IpResolver
public IpResolver()
- Parameters:
type -
resolveToName
public java.lang.String resolveToName(byte[] address,
long hash)
- Description copied from class:
AbstractResolver
- Resolves an address to a name. Performs any neccessary lookups to try and
resolve the name. The method should not access any of the cached
information. THis method is called only after the cache has already been
checked and failed to produce a positive or negative lookup entry.
- Specified by:
resolveToName in class AbstractResolver
- Parameters:
address - address to resolvehash - computed hash code for the address, identifies the address
uniquely
toHashCode
public long toHashCode(byte[] address)
- Specified by:
toHashCode in class AbstractResolver
resolveToName
protected java.lang.String resolveToName(long number,
long hash)
- Description copied from class:
AbstractResolver
- Resolves number to a name. Performs any neccessary lookups to try and
resolve the name. The method should not access any of the cached
information. THis method is called only after the cache has already been
checked and failed to produce a positive or negative lookup entry.
- Specified by:
resolveToName in class AbstractResolver
- Parameters:
number - a number value to resolvehash - computed hash code for the number, identifies the number uniquely