Package org.xbill.DNS.lookup
Class LookupSession
java.lang.Object
org.xbill.DNS.lookup.LookupSession
LookupSession provides facilities to make DNS Queries. A LookupSession is intended to be long
lived, and it's behaviour can be configured using the properties of the
LookupSession.LookupSessionBuilder instance returned by builder().- Since:
- 3.4
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns an emptyLookupSession.LookupSessionBuilderinstance.Returns aLookupSession.LookupSessionBuilderinstance initialized with defaults.lookupAsync(Name name, int type) Make an asynchronous lookup of the provided name using the defaultDClass.IN.lookupAsync(Name name, int type, int dclass) Make an asynchronous lookup of the provided name.lookupAsync(Record question) Make an asynchronous lookup with the providedRecord.
-
Field Details
-
DEFAULT_MAX_ITERATIONS
public static final int DEFAULT_MAX_ITERATIONS- See Also:
-
DEFAULT_NDOTS
public static final int DEFAULT_NDOTS- See Also:
-
-
Method Details
-
builder
Returns an emptyLookupSession.LookupSessionBuilderinstance. SeedefaultBuilder()for a builder initialized with defaults. -
defaultBuilder
Returns aLookupSession.LookupSessionBuilderinstance initialized with defaults.- Resolver: an
ExtendedResolverinitialized with the system's default DNS servers as determined byResolverConfig. - ndots: as determined by
ResolverConfig. - Cache: A cache for the
INclass is installed. - Hosts: The local host database file is used.
- Resolver: an
-
lookupAsync
Make an asynchronous lookup with the providedRecord.- Parameters:
question- the name, type and DClass to look up.- Returns:
- A
CompletionStagewhat will yield the eventual lookup result. - Since:
- 3.6
-
lookupAsync
Make an asynchronous lookup of the provided name using the defaultDClass.IN.- Parameters:
name- the name to look up.type- the type to look up, values should correspond to constants inType.- Returns:
- A
CompletionStagewhat will yield the eventual lookup result.
-
lookupAsync
Make an asynchronous lookup of the provided name.- Parameters:
name- the name to look up.type- the type to look up, values should correspond to constants inType.dclass- the class to look up, values should correspond to constants inDClass.- Returns:
- A
CompletionStagewhat will yield the eventual lookup result.
-