com.netflix.discovery
Class DiscoveryManager

java.lang.Object
  extended by com.netflix.discovery.DiscoveryManager

public class DiscoveryManager
extends java.lang.Object

Discovery Manager configures Discovery Client based on the properties specified.

The configuration file is searched for in the classpath with the name specified by the property eureka.client.props and with the suffix .properties. If the property is not specified, eureka-client.properties is assumed as the default.


Method Summary
 DiscoveryClient getDiscoveryClient()
          Get the DiscoveryClient
 EurekaClientConfig getEurekaClientConfig()
          Get the instance of EurekaClientConfig this instance was initialized with.
 EurekaInstanceConfig getEurekaInstanceConfig()
          Get the instance of EurekaInstanceConfig this instance was initialized with.
static DiscoveryManager getInstance()
           
 LookupService getLookupService()
           
 void initComponent(EurekaInstanceConfig config, EurekaClientConfig eurekaConfig)
          Initializes the Discovery Client with the given configuration.
 void shutdownComponent()
          Shuts down the Discovery Client which unregisters the information about this instance from the Discovery Server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DiscoveryManager getInstance()

initComponent

public void initComponent(EurekaInstanceConfig config,
                          EurekaClientConfig eurekaConfig)
Initializes the Discovery Client with the given configuration.

Parameters:
config - the instance info configuration that will be used for registration with Eureka.
eurekaConfig - the eureka client configuration of the instance.

shutdownComponent

public void shutdownComponent()
Shuts down the Discovery Client which unregisters the information about this instance from the Discovery Server.


getLookupService

public LookupService getLookupService()

getDiscoveryClient

public DiscoveryClient getDiscoveryClient()
Get the DiscoveryClient

Returns:
the client that is used to talk to eureka.

getEurekaClientConfig

public EurekaClientConfig getEurekaClientConfig()
Get the instance of EurekaClientConfig this instance was initialized with.

Returns:
the instance of EurekaClientConfig this instance was initialized with.

getEurekaInstanceConfig

public EurekaInstanceConfig getEurekaInstanceConfig()
Get the instance of EurekaInstanceConfig this instance was initialized with.

Returns:
the instance of EurekaInstanceConfig this instance was initialized with.