You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by hb...@apache.org on 2001/09/24 19:25:45 UTC

cvs commit: jakarta-james/src/java/org/apache/james/services DNSServer.java

hbedi       01/09/24 10:25:45

  Modified:    src/java/org/apache/james/services DNSServer.java
  Log:
  Updated DNS Java library.
  Attempted to make the interface generic, but stopped short. Did not
  want to tie the interface to a specfic implementation.
  
  Revision  Changes    Path
  1.3       +21 -0     jakarta-james/src/java/org/apache/james/services/DNSServer.java
  
  Index: DNSServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/services/DNSServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DNSServer.java	2001/09/06 13:19:32	1.2
  +++ DNSServer.java	2001/09/24 17:25:45	1.3
  @@ -8,9 +8,30 @@
   package org.apache.james.services;
   
   import java.util.Collection;
  +//import org.xbill.DNS.Record;
   
  +/**
  + * Provides abstraction for DNS resolutions. The interface is Mail specific.
  + * It may be a good idea to make the interface more generic or expose 
  + * commonly needed DNS methods.
  + * @author  Harmeet <ha...@kodemuse.com>
  + */
   public interface DNSServer {
       String ROLE = "org.apache.james.services.DNSServer";
   
  +    /** 
  +     * @return collection of strings representing MX record values. 
  +     * The returned collection is sorted by priority.
  +     */
       Collection findMXRecords(String hostname);
  +
  +    /** @param name : query name, 
  +     * @param type : Record type. @param type is expected to be one of the 
  +     * types defined in org.xbill.DNS.Type
  +     */
  +    // I thought this was a good general method to expose :-)
  +    // but it ties the interface to xbill library.:-(
  +    // the interface should be neutral and implementation replaceable.
  +    // one way is to have a DNSRecord abstraction...
  +    //Record[] lookup(String name, short type);
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org