public void initComponent(EurekaInstanceConfig config,
                              EurekaClientConfig eurekaConfig, AbstractDiscoveryClientOptionalArgs args) {
        this.eurekaInstanceConfig = config;
        this.eurekaClientConfig = eurekaConfig;
        if (ApplicationInfoManager.getInstance().getInfo() == null) {
            // Initialize application info
            ApplicationInfoManager.getInstance().initComponent(config);
        }
        InstanceInfo info = ApplicationInfoManager.getInstance().getInfo();
        discoveryClient = new DiscoveryClient(info, eurekaConfig, args);
    }
public void initComponent ( EurekaInstanceConfig config , EurekaClientConfig eurekaConfig , AbstractDiscoveryClientOptionalArgs args ) { this . eurekaInstanceConfig = config ; this . eurekaClientConfig = eurekaConfig ; if ( ApplicationInfoManager . getInstance ( ) . getInfo ( ) == null ) { ApplicationInfoManager . getInstance ( ) . initComponent ( config ) ; } InstanceInfo info = ApplicationInfoManager . getInstance ( ) . getInfo ( ) ; discoveryClient = new DiscoveryClient ( info , eurekaConfig , args ) ; }
Initializes the <tt>Discovery Client</tt> with the given configuration.

@param config
the instance info configuration that will be used for
registration with Eureka.
@param eurekaConfig the eureka client configuration of the instance.