com.nepxion.discovery.plugin.strategy.adapter.DefaultDiscoveryEnabledStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discovery-plugin-strategy Show documentation
Show all versions of discovery-plugin-strategy Show documentation
Nepxion Discovery is an enhancement for Spring Cloud Discovery
package com.nepxion.discovery.plugin.strategy.adapter;
/**
* Title: Nepxion Discovery
* Description: Nepxion Discovery
* Copyright: Copyright (c) 2017-2050
* Company: Nepxion
* @author Haojun Ren
* @version 1.0
*/
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import com.nepxion.discovery.plugin.framework.adapter.PluginAdapter;
import com.nepxion.discovery.plugin.strategy.context.StrategyContextHolder;
public abstract class DefaultDiscoveryEnabledStrategy implements DiscoveryEnabledStrategy {
@Autowired
private ApplicationContext applicationContext;
@Autowired
protected PluginAdapter pluginAdapter;
protected StrategyContextHolder strategyContextHolder;
@PostConstruct
private void initialize() {
strategyContextHolder = applicationContext.getBean(StrategyContextHolder.class);
}
public PluginAdapter getPluginAdapter() {
return pluginAdapter;
}
public StrategyContextHolder getStrategyContextHolder() {
return strategyContextHolder;
}
}