org.nhindirect.dns.module
Class DNSServerModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.nhindirect.dns.module.DNSServerModule
All Implemented Interfaces:
com.google.inject.Module

public class DNSServerModule
extends com.google.inject.AbstractModule

Guice module for configuring and creating DNSServer instances. Allows configuration either using just a URL to a configuration service, or more advanced options by using providers.

Since:
1.0
Author:
Greg Meyer

Method Summary
static DNSServerModule create(com.google.inject.Provider<DNSStore> dnsStore)
          Creates a module using a specific DNSStore provider and default server settings.
static DNSServerModule create(com.google.inject.Provider<DNSStore> dnsStore, com.google.inject.Provider<DNSServerSettings> settings)
          Creates a module using specific DNSStore and DNSServerSettings providers
static DNSServerModule create(URL configServiceURL)
          Creates a module using just a configuration URL.
 
Methods inherited from class com.google.inject.AbstractModule
configure
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static DNSServerModule create(URL configServiceURL)
Creates a module using just a configuration URL. The server is created using the ConfigServiceDNSStore class with default server settings.

Parameters:
configServiceURL - A URL that provides the location to the configuration service.
Returns:
A DNSServerModule used to create instances of the DNS server.

create

public static DNSServerModule create(com.google.inject.Provider<DNSStore> dnsStore)
Creates a module using a specific DNSStore provider and default server settings.

Parameters:
dnsStore - A provider used to create instances of the DNSStore.
Returns:
A DNSServerModule used to create instances of the DNS server.

create

public static DNSServerModule create(com.google.inject.Provider<DNSStore> dnsStore,
                                     com.google.inject.Provider<DNSServerSettings> settings)
Creates a module using specific DNSStore and DNSServerSettings providers

Parameters:
dnsStore - A provider used to create instances of the DNSStore.
settings - A provider used to create instances of the DNSServerSettings.
Returns:
A DNSServerModule used to create instances of the DNS server.


Copyright © 2010-2015 The Direct Project. All Rights Reserved.