Examples of ConfigurationManager


Examples of org.jmule.core.configmanager.ConfigurationManager

  private static void insertMyDetails(KadPacket packet) throws JMException {
    packet.insertData(JKadManagerSingleton.getInstance().getClientID()
        .toByteArray());
    packet.insertData(JKadManagerSingleton.getInstance().getIPAddress()
        .getAddress());
    ConfigurationManager configManager = ConfigurationManagerSingleton
        .getInstance();
    packet.insertData(intToShort(configManager.getUDP()));
    packet.insertData(intToShort(configManager.getTCP()));
  }
View Full Code Here

Examples of org.jmule.core.configmanager.ConfigurationManager

       
      }
     
    }
   
    ConfigurationManager configuration_manager = ConfigurationManagerSingleton.getInstance();
   
    configuration_manager.initialize();
   
    configuration_manager.start();
   
    UserHash hash = null;
    try {
      hash = configuration_manager.getUserHash();
    } catch (ConfigurationManagerException e1) {
      e1.printStackTrace();
    }
    if (hash == null) {
      hash = UserHash.genNewUserHash();
      try {
        ((InternalConfigurationManager)configuration_manager).setUserHash(hash);
      } catch (ConfigurationManagerException e) {
        e.printStackTrace();
      }
    }

    Logger log = Logger.getLogger("org.jmule");
   
    /**Setup logger*/
   
    log.setLevel(Level.ALL);//Log all events
   
    try {
      FileHandler fileHandler = new FileHandler(ConfigurationManager.LOGS_DIR+File.separator+"JMule%u.log",(int)ConfigurationManager.LOG_FILE_SIZE,ConfigurationManager.LOG_FILES_NUMBER);
     
      fileHandler.setFormatter(new SimpleFormatter());
     
      log.addHandler(fileHandler);
     
    } catch (Throwable e) {
     
      e.printStackTrace();
    }
   
    NetworkManagerSingleton.getInstance().initialize();
    NetworkManagerSingleton.getInstance().start();
   
    // notifies that the config manager has been started
    notifyComponentStarted(configuration_manager);
   
    IPFilter ip_filter = IPFilterSingleton.getInstance();
    ip_filter.initialize();
    ip_filter.start();
   
    notifyComponentStarted( ip_filter );
   
    SharingManager sharingManager = SharingManagerSingleton.getInstance();
    sharingManager.initialize();
    sharingManager.start();
   
    sharingManager.loadCompletedFiles();
    sharingManager.loadPartialFiles();
   
    // notifies that the sharing manager has been started
    notifyComponentStarted(sharingManager);
   
    UploadManagerSingleton.getInstance().initialize();
   
    UploadManagerSingleton.getInstance().start();
   
    // notifies that the upload manager has been started
    notifyComponentStarted(UploadManagerSingleton.getInstance());
   
    SpeedManagerSingleton.getInstance().initialize();
   
    SpeedManagerSingleton.getInstance().start();
   
    // notifies that the speed manager has been started
    notifyComponentStarted(UploadManagerSingleton.getInstance());
   
    PeerManagerSingleton.getInstance().initialize();
   
    PeerManagerSingleton.getInstance().start();
   
    // notifies that the peer manager has been started
    notifyComponentStarted(PeerManagerSingleton.getInstance());

    // notifies that the download manager has been started
    DownloadManagerSingleton.getInstance().initialize();
   
    DownloadManagerSingleton.getInstance().start();
    notifyComponentStarted(DownloadManagerSingleton.getInstance());
   
    ServerManager servers_manager = ServerManagerSingleton.getInstance();
   
    servers_manager.initialize();
     
    try {
     
      servers_manager.loadServerList();
     
    } catch (Throwable t) {
     
      t.printStackTrace();
    }
   
    servers_manager.start();
   
    // notifies that the download manager has been started
    notifyComponentStarted(servers_manager);
   
    //servers_manager.startUDPQuery();
   
    SearchManager search_manager = SearchManagerSingleton.getInstance();
   
    search_manager.initialize();
   
    search_manager.start();
   
    notifyComponentStarted(search_manager);
   
    JKadManagerSingleton.getInstance().initialize();
    try {
      if (configuration_manager.isJKadAutoconnectEnabled()) {
        JKadManagerSingleton.getInstance().start();
      }
    } catch (ConfigurationManagerException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.jmule.core.configmanager.ConfigurationManager

        if (!_jkad_manager.isConnected()) {
          return;
        }
        List<KadContact> list = routing_table
            .getRandomContacts(FIREWALL_CHECK_CONTACTS);
        ConfigurationManager configManager = ConfigurationManagerSingleton
            .getInstance();
        for (KadContact contact : list) {
          KadPacket packet;
          try {
            packet = PacketFactory.getFirewalled1Req(configManager
                .getTCP());
            _network_manager.sendKadPacket(packet, contact
                .getIPAddress(), contact.getUDPPort());
          } catch (ConfigurationManagerException e) {
            e.printStackTrace();
View Full Code Here

Examples of org.olat.configuration.ConfigurationManager

      /**
       * delete from o_property where name='org.olat.instantMessaging.InstantMessagingModule::issynced';
       */
     
      //the new way to get the (singleton) ConfigurationManager
      ConfigurationManager cman = (ConfigurationManager)CoreSpringFactory.getBean("olatconfigbean");
      boolean isSynced = cman.findOrCreateBooleanProperty(InstantMessagingModule.class, CONFIG_SYNCED_KEY, false);
      if (!isSynced) {
       
        if (config.isSyncPersonalGroups()) InstantMessagingModule.getAdapter().synchronizeAllBuddyGroupsWithIMServer();
        if (config.isSyncLearningGroups()) InstantMessagingModule.getAdapter().synchronizeLearningGroupsWithIMServer();
        cman.setBooleanProperty(InstantMessagingModule.class, CONFIG_SYNCED_KEY, true);
      }

      // Cleanup, otherwise this subjects will have problems in normal OLAT
      // operation
      DBFactory.getInstance().intermediateCommit();
View Full Code Here

Examples of org.ops4j.pax.exam.ConfigurationManager

    private ConfigurationManager cm;

    public WildFly80TestContainer(ExamSystem system, FrameworkFactory frameworkFactory) {
        this.system = system;
        this.testDirectory = TestDirectory.getInstance();
        this.cm = new ConfigurationManager();
    }
View Full Code Here

Examples of org.rhq.core.pc.configuration.ConfigurationManager

    protected int loadUpdateConfigChildResources(Resource rootResource, List<String> ignoredResources)
        throws InterruptedException, PluginContainerException {

        ignoredResources = (ignoredResources == null) ? new ArrayList<String>() : ignoredResources;

        ConfigurationManager configManager = this.pluginContainer.getConfigurationManager();
        Thread.sleep(10 * 1000L);

        Queue<Resource> unparsedResources = new LinkedList<Resource>();
        addCommitedChildrenToCollection(unparsedResources, rootResource, ignoredResources);

        int errorCount = 0;

        while (!unparsedResources.isEmpty()) {
            Resource resourceUnderTest = unparsedResources.poll();

            addCommitedChildrenToCollection(unparsedResources, resourceUnderTest, ignoredResources);

            if (resourceUnderTest.getResourceType().getResourceConfigurationDefinition() != null) {
                Configuration configUnderTest = configManager.loadResourceConfiguration(resourceUnderTest.getId());

                ConfigurationUpdateRequest updateRequest = new ConfigurationUpdateRequest(1, configUnderTest,
                    resourceUnderTest.getId());
                ConfigurationUpdateResponse updateResponse = configManager
                    .executeUpdateResourceConfigurationImmediately(updateRequest);

                if (updateResponse == null) {
                    errorCount++;
                    log.error("------------------------------");
View Full Code Here

Examples of org.sfaci.bombermanx.managers.ConfigurationManager

    // Crea la cámara y define la zona de visión del juego (toda la pantalla)
    /*camera = new OrthographicCamera();
    camera.setToOrtho(false, Constants.SCREEN_WIDTH, Constants.SCREEN_HEIGHT);
    camera.update();*/

        configurationManager = new ConfigurationManager();
   
    //setScreen(new MainMenuScreen(this));
        setScreen(new SplashScreen(this));
  }
View Full Code Here

Examples of org.sfsoft.jfighter2dx.managers.ConfigurationManager

  }

  @Override
  public void create() {
   
    configurationManager = new ConfigurationManager();
   
    camera = new OrthographicCamera();
    camera.setToOrtho(false, Constants.SCREEN_WIDTH, Constants.SCREEN_HEIGHT);
    camera.update();
   
View Full Code Here

Examples of org.sonatype.security.realms.tools.ConfigurationManager

    user.addRole(new RoleIdentifier("default", "role1"));
    user.addRole(new RoleIdentifier("default", "role3"));

    userManager.addUser(user, "my-password");

    ConfigurationManager config = this.getConfigurationManager();

    CUser secUser = config.readUser(user.getUserId());
    Assert.assertEquals(secUser.getId(), user.getUserId());
    Assert.assertEquals(secUser.getEmail(), user.getEmailAddress());
    Assert.assertEquals(secUser.getFirstName(), user.getFirstName());
    Assert.assertEquals(secUser.getLastName(), user.getLastName());
    assertThat(this.passwordService.passwordsMatch("my-password", secUser.getPassword()), is(true));

    Assert.assertEquals(secUser.getStatus(), user.getStatus().name());

    CUserRoleMapping roleMapping = config.readUserRoleMapping("testCreateUser", "default");

    Assert.assertTrue(roleMapping.getRoles().contains("role1"));
    Assert.assertTrue(roleMapping.getRoles().contains("role3"));
    Assert.assertEquals(2, roleMapping.getRoles().size());
  }
View Full Code Here

Examples of org.tubo.configuration.ConfigurationManager

     * @throws TuboKernelException If somthing fail
     */
    public Kernel createKernel() throws TuboKernelException {
        //
        // create a ConfigurationManager
        ConfigurationManager configurationManager;
        try {
            configurationManager = new ConfigurationManager();
        } catch (TuboConfigurationException e) {
            throw new TuboKernelException("ConfigurationManager can't be created",e);
        }
        //
        // load base configuration
        try {
            String baseConfig = getBaseConfigLocation();
            log.info(".createKernel() - Loading base config url="+baseConfig);
            configurationManager.appendResource(baseConfig);
        } catch (TuboConfigurationException e) {
            throw new TuboKernelException("Base Config Location can't be configured",e);
        }
        //
        // append custom connfiguration
        for (Iterator it=configLocations.iterator(); it.hasNext();) {
            String resourceLocation = (String)it.next();
            log.info(".createKernel() - Appendig config url="+configLocations);
            try {
                configurationManager.appendResource(resourceLocation);
            } catch (TuboConfigurationException e) {
                throw new TuboKernelException("Config "+resourceLocation+" has problems to be appened",e);
            }
        }
        //
        // create a instance of KernelBuilder based on configuration
        String kernelBuilderClassName = configurationManager.getConfiguration().getKernelBuilderClassName();
        KernelBuilder kernelBuilder;
        try {
            kernelBuilder = (KernelBuilder)Class.forName(kernelBuilderClassName).newInstance();
        } catch (InstantiationException e) {
            throw new TuboKernelException("Error instanciating KernelBuilder ("+kernelBuilderClassName+")",e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.