Package com.cloud.utils.component

Examples of com.cloud.utils.component.ComponentLocator$ComponentInfo


  }

  public boolean configure(String name, Map<String, Object> params)
      throws ConfigurationException {
    super.configure(name, params);
    ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name);
    _userAccountDao = locator.getDao(UserAccountDao.class);
    return true;
  }
View Full Code Here


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

        final ComponentLocator locator = ComponentLocator.getCurrentLocator();
        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("AgentManager", params);
View Full Code Here

    }

    public boolean configure(String name, Map<String, Object> params)
            throws ConfigurationException {
        super.configure(name, params);
        ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name);
        _configDao = locator.getDao(ConfigurationDao.class);
        _userAccountDao = locator.getDao(UserAccountDao.class);
        return true;
    }
View Full Code Here

    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
        super.configure(name, params);
       
        ComponentLocator locator = ComponentLocator.getCurrentLocator();
       
        _firstFitStoragePoolAllocator = ComponentLocator.inject(FirstFitStoragePoolAllocator.class);
        _firstFitStoragePoolAllocator.configure("GCFirstFitStoragePoolAllocator", params);
        _localStoragePoolAllocator = ComponentLocator.inject(LocalStoragePoolAllocator.class);
        _localStoragePoolAllocator.configure("GCLocalStoragePoolAllocator", params);
       
        _storageMgr = locator.getManager(StorageManager.class);
        if (_storageMgr == null) {
          throw new ConfigurationException("Unable to get " + StorageManager.class.getName());
        }
       
        _configDao = locator.getDao(ConfigurationDao.class);
        if (_configDao == null) {
            throw new ConfigurationException("Unable to get the configuration dao.");
        }
       
        String storagePoolCleanupEnabled = _configDao.getValue("storage.pool.cleanup.enabled");
View Full Code Here

    Map<HypervisorType, HypervisorGuru> _hvGurus = new HashMap<HypervisorType, HypervisorGuru>();
 
  @Override
  public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
    _name = name;
        ComponentLocator locator = ComponentLocator.getCurrentLocator();

        Adapters<HypervisorGuru> hvGurus = locator.getAdapters(HypervisorGuru.class);
        for (HypervisorGuru guru : hvGurus) {
            _hvGurus.put(guru.getHypervisorType(), guru);
        }
   
    return true;
View Full Code Here

    }
  }
 
  @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
    ComponentLocator locator = ComponentLocator.getCurrentLocator();
        _configDao = locator.getDao(ConfigurationDao.class);
    _setupAgentPath = Script.findScript(getPatchPath(), "setup_agent.sh");
    _kvmPrivateNic = _configDao.getValue(Config.KvmPrivateNetwork.key());
    if (_kvmPrivateNic == null) {
        _kvmPrivateNic = "cloudbr0";
    }
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) {
      throw new ConfigurationException("Unable to get the configuration dao.");
    }

    int expireMinutes = NumbersUtil.parseInt(
           configDao.getValue(Config.JobExpireMinutes.key()), 24*60);
    _jobExpireSeconds = (long)expireMinutes*60;
   
    _jobCancelThresholdSeconds = NumbersUtil.parseInt(
           configDao.getValue(Config.JobCancelThresholdMinutes.key()), 60);
    _jobCancelThresholdSeconds *= 60;

    _accountDao = locator.getDao(AccountDao.class);
    if (_accountDao == null) {
            throw new ConfigurationException("Unable to get " + AccountDao.class.getName());
    }
    _jobDao = locator.getDao(AsyncJobDao.class);
    if (_jobDao == null) {
      throw new ConfigurationException("Unable to get "
          + AsyncJobDao.class.getName());
    }
   
    _context =   locator.getManager(AsyncJobExecutorContext.class);
    if (_context == null) {
      throw new ConfigurationException("Unable to get "
          + AsyncJobExecutorContext.class.getName());
    }
   
    _queueMgr = locator.getManager(SyncQueueManager.class);
    if(_queueMgr == null) {
      throw new ConfigurationException("Unable to get "
          + SyncQueueManager.class.getName());
    }
   
    _clusterMgr = locator.getManager(ClusterManager.class);
   
    _accountMgr = locator.getManager(AccountManager.class);

    _dispatcher = ApiDispatcher.getInstance();
   

    try {
View Full Code Here

  }
 
    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
      _name = name;
    ComponentLocator locator = ComponentLocator.getCurrentLocator();
   
    _managementServer = (ManagementServer)ComponentLocator.getComponent("management-server");
        if (_managementServer == null) {
            throw new ConfigurationException("unable to get " + ManagementServer.class.getName());
        }

        _agentMgr = locator.getManager(AgentManager.class);
        if (_agentMgr == null) {
            throw new ConfigurationException("unable to get " + AgentManager.class.getName());
        }
       
        _networkMgr = locator.getManager(NetworkManager.class);
        if (_networkMgr == null) {
            throw new ConfigurationException("unable to get " + NetworkManager.class.getName());
        }
       
        _vmMgr = locator.getManager(UserVmManager.class);
        if (_vmMgr == null) {
            throw new ConfigurationException("unable to get " + UserVmManager.class.getName());
        }
       
        _snapMgr = locator.getManager(SnapshotManager.class);
        if (_snapMgr == null) {
            throw new ConfigurationException("unable to get " + SnapshotManager.class.getName());
        }
       
        _accountMgr = locator.getManager(AccountManager.class);
        if (_accountMgr == null) {
            throw new ConfigurationException("unable to get " + AccountManager.class.getName());
        }
       
        _storageMgr = locator.getManager(StorageManager.class);
        if (_storageMgr == null) {
          throw new ConfigurationException("unable to get " + StorageManager.class.getName());
        }
       
        _eventDao = locator.getDao(EventDao.class);
        if (_eventDao == null) {
            throw new ConfigurationException("unable to get " + EventDao.class.getName());
        }
       
        _vmDao = locator.getDao(UserVmDao.class);
        if (_vmDao == null) {
            throw new ConfigurationException("unable to get " + UserVmDao.class.getName());
        }
       
        _accountDao = locator.getDao(AccountDao.class);
        if (_accountDao == null) {
            throw new ConfigurationException("unable to get " + AccountDao.class.getName());
        }
       
        _volumeDao = locator.getDao(VolumeDao.class);
        if (_volumeDao == null) {
            throw new ConfigurationException("unable to get " + VolumeDao.class.getName());
        }
       
        _routerDao = locator.getDao(DomainRouterDao.class);
        if (_routerDao == null) {
            throw new ConfigurationException("unable to get " + DomainRouterDao.class.getName());
        }
       
        _ipAddressDao = locator.getDao(IPAddressDao.class);
        if (_ipAddressDao == null) {
            throw new ConfigurationException("unable to get " + IPAddressDao.class.getName());
        }
       
        _jobDao = locator.getDao(AsyncJobDao.class);
        if(_jobDao == null) {
            throw new ConfigurationException("unable to get " + AsyncJobDao.class.getName());
        }
       
        _userDao = locator.getDao(UserDao.class);
        if(_userDao == null) {
            throw new ConfigurationException("unable to get " + UserDao.class.getName());
        }
       
        _itMgr = locator.getManager(VirtualMachineManager.class);
        if (_itMgr == null) {
          throw new ConfigurationException("unable to get " + VirtualMachineManager.class.getName());
        }
      return true;
    }
View Full Code Here

    }
   
    @Override
    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
      _name = name;
    ComponentLocator locator = ComponentLocator.getCurrentLocator();
   
    _syncQueueDao = locator.getDao(SyncQueueDao.class);
    if (_syncQueueDao == null) {
      throw new ConfigurationException("Unable to get "
          + SyncQueueDao.class.getName());
    }
   
    _syncQueueItemDao = locator.getDao(SyncQueueItemDao.class);
    if (_syncQueueItemDao == null) {
      throw new ConfigurationException("Unable to get "
          + SyncQueueDao.class.getName());
    }
     
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. " + ConfigurationDao.class.getName());
            return false;
        }
        _snapshotPollInterval = NumbersUtil.parseInt(configDao.getValue("snapshot.poll.interval"), 300);
View Full Code Here

TOP

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

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.