com.karmasphere.server.handler.share
Class DnsClient

java.lang.Object
  extended by com.karmasphere.server.handler.share.DnsClient

public class DnsClient
extends Object

A DnsClient wrapper. This structure ensures that in a high throughput environment, there is a fixed minimum time before the same query id and source port pair is used.


Field Summary
static int CREDIBILITY
           
static long MIN_WRAP_TIME
          Default minimum time before sending a dns query with repeated id in milliseconds.
 
Constructor Summary
DnsClient(com.karmasphere.server.handler.HandlerMap backend)
          Create a new DnsClient with the specified HandlerMap.
 
Method Summary
 void query(org.xbill.DNS.Name name, int type, ResponseCallback rc)
          Send a dns query, and send the response to c if/when it arrives.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MIN_WRAP_TIME

public static final long MIN_WRAP_TIME
Default minimum time before sending a dns query with repeated id in milliseconds.

See Also:
Constant Field Values

CREDIBILITY

public static final int CREDIBILITY
See Also:
Constant Field Values
Constructor Detail

DnsClient

public DnsClient(com.karmasphere.server.handler.HandlerMap backend)
          throws IOException
Create a new DnsClient with the specified HandlerMap.

Parameters:
backend - The HandlerMap.
Throws:
IOException
Method Detail

query

public void query(org.xbill.DNS.Name name,
                  int type,
                  ResponseCallback rc)
           throws IOException
Send a dns query, and send the response to c if/when it arrives.

Parameters:
m - The dns lookup to send.
c - The callback to send the response back to.
Throws:
IOException


Copyright © 2004-2005 Karamsphere. All Rights Reserved.