org.apache.james.jspf.impl
Class DNSServiceAsynchSimulator

java.lang.Object
  extended by org.apache.james.jspf.impl.DNSServiceAsynchSimulator
All Implemented Interfaces:
java.lang.Runnable, DNSAsynchLookupService

public class DNSServiceAsynchSimulator
extends java.lang.Object
implements java.lang.Runnable, DNSAsynchLookupService

Wrap a DNSService an execute the calls asynch in a new Thread


Constructor Summary
DNSServiceAsynchSimulator(DNSService service, boolean multiThread)
           
 
Method Summary
 void getRecordsAsynch(DNSRequest request, int id, IResponseQueue responsePool)
          Retrieve dns records for the given host asynchronously
 void run()
          Run the async dns call in a new thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNSServiceAsynchSimulator

public DNSServiceAsynchSimulator(DNSService service,
                                 boolean multiThread)
Method Detail

getRecordsAsynch

public void getRecordsAsynch(DNSRequest request,
                             int id,
                             IResponseQueue responsePool)
Description copied from interface: DNSAsynchLookupService
Retrieve dns records for the given host asynchronously

Specified by:
getRecordsAsynch in interface DNSAsynchLookupService
Parameters:
request - the dns request
id - the identification key for the response.
responsePool - the queue where the response will be appended.
See Also:
DNSAsynchLookupService.getRecordsAsynch(org.apache.james.jspf.core.DNSRequest, int, org.apache.james.jspf.executor.IResponseQueue)

run

public void run()
Run the async dns call in a new thread

Specified by:
run in interface java.lang.Runnable


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