Package com.cloud.utils.component

Examples of com.cloud.utils.component.ComponentLocator


    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        _name = name;
       
        ComponentLocator locator = ComponentLocator.getCurrentLocator();
       
        final Map<String, String> configs = _configDao.getConfiguration("AgentManager", params);
        _routerTemplateId = NumbersUtil.parseInt(configs.get("router.template.id"), 1);

        String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString());
View Full Code Here


        return true;
    }

    @Override
    public boolean configure(String name, Map<String, Object> params) {
        ComponentLocator locator = ComponentLocator.getCurrentLocator();
        _hostDao = locator.getDao(HostDao.class);
        _resourceMgr = locator.getManager(ResourceManager.class);
        if (_hostDao == null) {
            s_logger.error("Unable to get host dao.");
            return false;
        }
        _name=name;
View Full Code Here

    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        _name = name;

        ComponentLocator locator = ComponentLocator.getCurrentLocator();
        ConfigurationDao configDao = locator.getDao(ConfigurationDao.class);
        Map<String, String> configs = configDao.getConfiguration(params);

        _userLimit = NumbersUtil.parseInt(configs.get(Config.RemoteAccessVpnUserLimit.key()), 8);

        _clientIpRange = configs.get(Config.RemoteAccessVpnClientIpRange.key());
View Full Code Here

    private final TimeZone _usageTimezone;

    protected ManagementServerExtImpl() {
        super();

        ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name);
        _accountDao = locator.getDao(AccountDao.class);
        _domainDao = locator.getDao(DomainDao.class);
        _usageDao = locator.getDao(UsageDao.class);
        _usageJobDao = locator.getDao(UsageJobDao.class);

        Map<String, String> configs = getConfigs();
        String timeZoneStr = configs.get("usage.aggregation.timezone");
        if (timeZoneStr == null) {
            timeZoneStr = "GMT";
View Full Code Here

            s_logger.info("Implementation Version is " + m_version);
        }

        m_name = name;

        ComponentLocator locator = ComponentLocator.getCurrentLocator();
        ConfigurationDao configDao = locator.getDao(ConfigurationDao.class);
        if (configDao == null) {
            s_logger.error("Unable to get the configuration dao.");
            return false;
        }
View Full Code Here

    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        _name = name;

        ComponentLocator locator = ComponentLocator.getCurrentLocator();
        _configDao = locator.getDao(ConfigurationDao.class);
        if (_configDao == null) {
            throw new ConfigurationException("Unable to get the configuration dao.");
        }

        Map<String, String> configs = _configDao.getConfiguration("AgentManager", params);
View Full Code Here

    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        _name = name;

        final ComponentLocator locator = ComponentLocator.getCurrentLocator();
        _upgradeDao = locator.getDao(AgentUpgradeDao.class);
        if (_upgradeDao == null) {
            throw new ConfigurationException("Unable to retrieve the storage layer.");
        }

        ConfigurationDao configDao = locator.getDao(ConfigurationDao.class);
        if (configDao == null) {
            throw new ConfigurationException("Unable to get the configuration dao.");
        }

        final Map<String, String> configs = configDao.getConfiguration("UpgradeManager", params);
View Full Code Here

        if (s_logger.isInfoEnabled()) {
            s_logger.info("Start configuring cluster alert manager : " + name);
        }

        ComponentLocator locator = ComponentLocator.getCurrentLocator();

        _mshostDao = locator.getDao(ManagementServerHostDao.class);
        if (_mshostDao == null) {
            throw new ConfigurationException("Unable to get " + ManagementServerHostDao.class.getName());
        }

        _alertMgr = locator.getManager(AlertManager.class);
        if (_alertMgr == null) {
            throw new ConfigurationException("Unable to get " + AlertManager.class.getName());
        }

        try {
View Full Code Here

    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        _name = name;

        ComponentLocator locator = ComponentLocator.getCurrentLocator();
        ConfigurationDao configDao = locator.getDao(ConfigurationDao.class);
        if (configDao == null) {
            s_logger.error("Unable to get the configuration dao.");
            return false;
        }
View Full Code Here

    private final ResourceCountDao _resourceCountDao;
    private final NetworkOfferingServiceMapDao _ntwkOfferingServiceMapDao;
    private final IdentityDao _identityDao;

    public ConfigurationServerImpl() {
        ComponentLocator locator = ComponentLocator.getLocator(Name);
        _configDao = locator.getDao(ConfigurationDao.class);
        _zoneDao = locator.getDao(DataCenterDao.class);
        _podDao = locator.getDao(HostPodDao.class);
        _diskOfferingDao = locator.getDao(DiskOfferingDao.class);
        _serviceOfferingDao = locator.getDao(ServiceOfferingDao.class);
        _networkOfferingDao = locator.getDao(NetworkOfferingDao.class);
        _dataCenterDao = locator.getDao(DataCenterDao.class);
        _networkDao = locator.getDao(NetworkDao.class);
        _vlanDao = locator.getDao(VlanDao.class);
        _domainDao = locator.getDao(DomainDao.class);
        _accountDao = locator.getDao(AccountDao.class);
        _resourceCountDao = locator.getDao(ResourceCountDao.class);
        _ntwkOfferingServiceMapDao = locator.getDao(NetworkOfferingServiceMapDao.class);
        _identityDao = locator.getDao(IdentityDao.class);
    }
View Full Code Here

TOP

Related Classes of com.cloud.utils.component.ComponentLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.