Java Doc for Lookup.java in  » Net » dnsjava » org » xbill » DNS » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » dnsjava » org.xbill.DNS 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xbill.DNS.Lookup

Lookup
final public class Lookup (Code)
The Lookup object issues queries to caching DNS servers. The input consists of a name, an optional type, and an optional class. Caching is enabled by default and used when possible to reduce the number of DNS requests. A Resolver, which defaults to an ExtendedResolver initialized with the resolvers located by the ResolverConfig class, performs the queries. A search path of domain suffixes is used to resolve relative names, and is also determined by the ResolverConfig class. A Lookup object may be reused, but should not be used by multiple threads.
See Also:   Cache
See Also:   Resolver
See Also:   ResolverConfig
author:
   Brian Wellington


Field Summary
final public static  intHOST_NOT_FOUND
     The host does not exist.
final public static  intSUCCESSFUL
     The lookup was successful.
final public static  intTRY_AGAIN
     The lookup failed due to a network error.
final public static  intTYPE_NOT_FOUND
     The host exists, but has no records associated with the queried type.
final public static  intUNRECOVERABLE
     The lookup failed due to a data or server error.

Constructor Summary
public  Lookup(Name name, int type, int dclass)
     Create a Lookup object that will find records of the given name, type, and class.
public  Lookup(Name name, int type)
     Create a Lookup object that will find records of the given name and type in the IN class.
public  Lookup(Name name)
     Create a Lookup object that will find records of type A at the given name in the IN class.
public  Lookup(String name, int type, int dclass)
     Create a Lookup object that will find records of the given name, type, and class.
public  Lookup(String name, int type)
     Create a Lookup object that will find records of the given name and type in the IN class.
public  Lookup(String name)
     Create a Lookup object that will find records of type A at the given name in the IN class.

Method Summary
public  Name[]getAliases()
     Returns all known aliases for this name.
public  Record[]getAnswers()
     Returns the answers from the lookup.
public static synchronized  CachegetDefaultCache(int dclass)
     Gets the Cache that will be used as the default for the specified class by future Lookups.
Parameters:
  dclass - The class whose cache is being retrieved.
public static synchronized  ResolvergetDefaultResolver()
     Gets the Resolver that will be used as the default by future Lookups.
public static synchronized  Name[]getDefaultSearchPath()
     Gets the search path that will be used as the default by future Lookups.
public  StringgetErrorString()
     Returns an error string describing the result code of this lookup.
public  intgetResult()
     Returns the result code of the lookup.
public static synchronized  voidrefreshDefault()
    
public  Record[]run()
     Performs the lookup, using the specified Cache, Resolver, and search path.
public  voidsetCache(Cache cache)
     Sets the cache to use when performing this lookup.
public  voidsetCredibility(int credibility)
     Sets the minimum credibility level that will be accepted when performing the lookup.
public static synchronized  voidsetDefaultCache(Cache cache, int dclass)
     Sets the Cache to be used as the default for the specified class by future Lookups.
public static synchronized  voidsetDefaultResolver(Resolver resolver)
     Sets the default Resolver to be used as the default by future Lookups.
public static synchronized  voidsetDefaultSearchPath(Name[] domains)
     Sets the search path to be used as the default by future Lookups.
public static synchronized  voidsetDefaultSearchPath(String[] domains)
     Sets the search path that will be used as the default by future Lookups.
public  voidsetResolver(Resolver resolver)
     Sets the resolver to use when performing this lookup.
public  voidsetSearchPath(Name[] domains)
     Sets the search path to use when performing this lookup.
public  voidsetSearchPath(String[] domains)
     Sets the search path to use when performing this lookup.

Field Detail
HOST_NOT_FOUND
final public static int HOST_NOT_FOUND(Code)
The host does not exist.



SUCCESSFUL
final public static int SUCCESSFUL(Code)
The lookup was successful.



TRY_AGAIN
final public static int TRY_AGAIN(Code)
The lookup failed due to a network error. Repeating the lookup may be helpful.



TYPE_NOT_FOUND
final public static int TYPE_NOT_FOUND(Code)
The host exists, but has no records associated with the queried type.



UNRECOVERABLE
final public static int UNRECOVERABLE(Code)
The lookup failed due to a data or server error. Repeating the lookup would not be helpful.




Constructor Detail
Lookup
public Lookup(Name name, int type, int dclass)(Code)
Create a Lookup object that will find records of the given name, type, and class. The lookup will use the default cache, resolver, and search path, and look for records that are reasonably credible.
Parameters:
  name - The name of the desired records
Parameters:
  type - The type of the desired records
Parameters:
  dclass - The class of the desired records
throws:
  IllegalArgumentException - The type is a meta type other than ANY.
See Also:   Cache
See Also:   Resolver
See Also:   Credibility
See Also:   Name
See Also:   Type
See Also:   DClass



Lookup
public Lookup(Name name, int type)(Code)
Create a Lookup object that will find records of the given name and type in the IN class.
Parameters:
  name - The name of the desired records
Parameters:
  type - The type of the desired records
throws:
  IllegalArgumentException - The type is a meta type other than ANY.
See Also:   Lookup.Lookup(Name,int,int)



Lookup
public Lookup(Name name)(Code)
Create a Lookup object that will find records of type A at the given name in the IN class.
Parameters:
  name - The name of the desired records
See Also:   Lookup.Lookup(Name,int,int)



Lookup
public Lookup(String name, int type, int dclass) throws TextParseException(Code)
Create a Lookup object that will find records of the given name, type, and class.
Parameters:
  name - The name of the desired records
Parameters:
  type - The type of the desired records
Parameters:
  dclass - The class of the desired records
throws:
  TextParseException - The name is not a valid DNS name
throws:
  IllegalArgumentException - The type is a meta type other than ANY.
See Also:   Lookup.Lookup(Name,int,int)



Lookup
public Lookup(String name, int type) throws TextParseException(Code)
Create a Lookup object that will find records of the given name and type in the IN class.
Parameters:
  name - The name of the desired records
Parameters:
  type - The type of the desired records
throws:
  TextParseException - The name is not a valid DNS name
throws:
  IllegalArgumentException - The type is a meta type other than ANY.
See Also:   Lookup.Lookup(Name,int,int)



Lookup
public Lookup(String name) throws TextParseException(Code)
Create a Lookup object that will find records of type A at the given name in the IN class.
Parameters:
  name - The name of the desired records
throws:
  TextParseException - The name is not a valid DNS name
See Also:   Lookup.Lookup(Name,int,int)




Method Detail
getAliases
public Name[] getAliases()(Code)
Returns all known aliases for this name. Whenever a CNAME/DNAME is followed, an alias is added to this array. The last element in this array will be the owner name for records in the answer, if there are any. The aliases.
throws:
  IllegalStateException - The lookup has not completed.



getAnswers
public Record[] getAnswers()(Code)
Returns the answers from the lookup. The answers, or null if none are found.
throws:
  IllegalStateException - The lookup has not completed.



getDefaultCache
public static synchronized Cache getDefaultCache(int dclass)(Code)
Gets the Cache that will be used as the default for the specified class by future Lookups.
Parameters:
  dclass - The class whose cache is being retrieved. The default cache for the specified class.



getDefaultResolver
public static synchronized Resolver getDefaultResolver()(Code)
Gets the Resolver that will be used as the default by future Lookups. The default resolver.



getDefaultSearchPath
public static synchronized Name[] getDefaultSearchPath()(Code)
Gets the search path that will be used as the default by future Lookups. The default search path.



getErrorString
public String getErrorString()(Code)
Returns an error string describing the result code of this lookup. A string, which may either directly correspond the result codeor be more specific.
throws:
  IllegalStateException - The lookup has not completed.



getResult
public int getResult()(Code)
Returns the result code of the lookup. The result code, which can be SUCCESSFUL, UNRECOVERABLE, TRY_AGAIN,HOST_NOT_FOUND, or TYPE_NOT_FOUND.
throws:
  IllegalStateException - The lookup has not completed.



refreshDefault
public static synchronized void refreshDefault()(Code)



run
public Record[] run()(Code)
Performs the lookup, using the specified Cache, Resolver, and search path. The answers, or null if none are found.



setCache
public void setCache(Cache cache)(Code)
Sets the cache to use when performing this lookup. This overrides the default value. If the results of this lookup should not be permanently cached, null can be provided here.
Parameters:
  cache - The cache to use.



setCredibility
public void setCredibility(int credibility)(Code)
Sets the minimum credibility level that will be accepted when performing the lookup. This defaults to Credibility.NORMAL.
Parameters:
  credibility - The minimum credibility level.



setDefaultCache
public static synchronized void setDefaultCache(Cache cache, int dclass)(Code)
Sets the Cache to be used as the default for the specified class by future Lookups.
Parameters:
  cache - The default cache for the specified class.
Parameters:
  dclass - The class whose cache is being set.



setDefaultResolver
public static synchronized void setDefaultResolver(Resolver resolver)(Code)
Sets the default Resolver to be used as the default by future Lookups.
Parameters:
  resolver - The default resolver.



setDefaultSearchPath
public static synchronized void setDefaultSearchPath(Name[] domains)(Code)
Sets the search path to be used as the default by future Lookups.
Parameters:
  domains - The default search path.



setDefaultSearchPath
public static synchronized void setDefaultSearchPath(String[] domains) throws TextParseException(Code)
Sets the search path that will be used as the default by future Lookups.
Parameters:
  domains - The default search path.
throws:
  TextParseException - A name in the array is not a valid DNS name.



setResolver
public void setResolver(Resolver resolver)(Code)
Sets the resolver to use when performing this lookup. This overrides the default value.
Parameters:
  resolver - The resolver to use.



setSearchPath
public void setSearchPath(Name[] domains)(Code)
Sets the search path to use when performing this lookup. This overrides the default value.
Parameters:
  domains - An array of names containing the search path.



setSearchPath
public void setSearchPath(String[] domains) throws TextParseException(Code)
Sets the search path to use when performing this lookup. This overrides the default value.
Parameters:
  domains - An array of names containing the search path.
throws:
  TextParseException - A name in the array is not a valid DNS name.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.