org.apache.james.jdkim.impl
Class DNSPublicKeyRecordRetriever

java.lang.Object
  extended by org.apache.james.jdkim.impl.DNSPublicKeyRecordRetriever
All Implemented Interfaces:
PublicKeyRecordRetriever

public class DNSPublicKeyRecordRetriever
extends Object
implements PublicKeyRecordRetriever


Field Summary
protected  org.xbill.DNS.Resolver resolver
           
 
Constructor Summary
DNSPublicKeyRecordRetriever()
           
DNSPublicKeyRecordRetriever(org.xbill.DNS.Resolver resolver)
           
 
Method Summary
static List convertRecordsToList(org.xbill.DNS.Record[] rr)
          Convert the given TXT Record array to a String List
 List getRecords(CharSequence methodAndOptions, CharSequence selector, CharSequence token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected org.xbill.DNS.Resolver resolver
Constructor Detail

DNSPublicKeyRecordRetriever

public DNSPublicKeyRecordRetriever()

DNSPublicKeyRecordRetriever

public DNSPublicKeyRecordRetriever(org.xbill.DNS.Resolver resolver)
Method Detail

getRecords

public List getRecords(CharSequence methodAndOptions,
                       CharSequence selector,
                       CharSequence token)
                throws TempFailException,
                       PermFailException
Specified by:
getRecords in interface PublicKeyRecordRetriever
Parameters:
methodAndOptions - the options declared for the lookup method.
selector - the value of "s=" tag
token - the value of the "d=" tag
Returns:
A list of strings representing 0 to multiple records
Throws:
TempFailException - in case of timeout and other network errors.
PermFailException - in case of unsupported options
See Also:
PublicKeyRecordRetriever.getRecords(java.lang.CharSequence, java.lang.CharSequence, java.lang.CharSequence)

convertRecordsToList

public static List convertRecordsToList(org.xbill.DNS.Record[] rr)
Convert the given TXT Record array to a String List

Parameters:
rr - Record array
Returns:
list


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.