Examples of Config


Examples of com.yahoo.ycsb.Config

    }
  }
 
  public void run() {
    // Run the client threads
    Config config = Config.getConfig();
    ClientThreadPool pool = new ClientThreadPool(config.thread_count, config.operation_count, workload);
    pool.join();
   
    // Wait until the status thread grabs the last piece of stats data
    while (Measurements.getMeasurements().getPartialData().size() > 0) {
View Full Code Here

Examples of com.zack6849.alphabot.api.Config

        System.setProperty(SimpleLogger.LEVEL_IN_BRACKETS_KEY, "true");
        System.setProperty(SimpleLogger.SHOW_LOG_NAME_KEY, "false");
        System.out.println("Starting");
        try {
            startup = System.currentTimeMillis();
            final Config config = new Config();
            PermissionManager manager = new PermissionManager();
            System.out.println("Loading and registering commands");
            config.load();
            manager.load();
            Reflections reflections = new Reflections("com.zack6849.alphabot.commands");
            Set<Class<? extends Command>> subTypes = reflections.getSubTypesOf(Command.class);
            for (Class c : subTypes) {
                Command cmd = CommandRegistry.getCommand(c.getSimpleName());
                cmd.setManager(manager);
                cmd.setConfig(config);
                CommandRegistry.register(cmd);
            }
            //i have no idea what this is, but IDEA wouldn't shut the fuck up about changing it.
            Configuration.Builder<PircBotX> builder = new Configuration.Builder<PircBotX>();
            builder.setName(config.getBotNickname());
            builder.setRealName(config.getBotUsername());
            builder.setLogin(config.getBotIdent());
            builder.setFinger(config.getCtcpFinger());
            builder.setEncoding(Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset());
            builder.setNickservPassword(config.getBotPassword());
            builder.setVersion("Alphbot v2.0 BETA");
            builder.setAutoNickChange(config.isAutoNickChange());
            builder.setAutoReconnect(config.isAutoReconnectServer());
            builder.setServer(config.getServerHostame(), Integer.parseInt(config.getServerPort()), config.getServerPassword());
            builder.getListenerManager().addListener(new com.zack6849.alphabot.listeners.MessageEvent(config, manager));
            builder.getListenerManager().addListener(new com.zack6849.alphabot.listeners.InviteEvent(config, manager));
            for (String channel : config.getChannels()) {
                builder.addAutoJoinChannel(channel);
            }
            PircBotX bot = new PircBotX(builder.buildConfiguration());
            System.out.println("Starting bot...");
            if (config.isEnableChatSocket()) {
                new Thread(new ChatSocketListener(bot, config)).start();
            }
            bot.startBot();
            System.out.println("Shutting down");
            System.exit(0);
View Full Code Here

Examples of common.Config

public class CheckStarter {

    public void start() throws IOException {

        Config myCfgMsg = new Config();
        myCfgMsg.setConfigFile("./server/cfg/server.cfg");
        String cfgLang = myCfgMsg.getProp("language");

        myCfgMsg.setConfigFile("./server/messages/messages." + cfgLang);
        System.out.println("JUNM - Java Universal NetWork Monitor - Rel 0.0.2");
        System.out.println("-------------------------------------------------");
        System.out.println("Info: Gianluca.Garofalo@gmail.com");
        System.out.println("-------------------------------------------------");
        System.out.println(myCfgMsg.getProp("006"));


        try {
            Config myCfg = new Config();
            myCfg.setConfigFile("./deamon/cfg/checkstarter.cfg");
            String cfgPort = myCfg.getProp("porta");
            ServerSocket serverSocket = new ServerSocket(Integer.parseInt(cfgPort));
            InetAddress indirizzo = serverSocket.getInetAddress();
            String server = indirizzo.getHostAddress();
            int port = serverSocket.getLocalPort();
            System.out.println("Listener Attivo: " + server + " porta: " + port);
View Full Code Here

Examples of configuration.config

       this.mircbot = new mircBot()
       this.annonces=true;
         // Enable debugging output.
         this.mircbot.setVerbose(true);
        
         this.configuration = new config("Configuration/l4dpickup.conf");
  }
View Full Code Here

Examples of de.ailis.xadrian.support.Config

    private void calculateBaseComplex()
    {
        final FactoryFactory factoryFactory = this.game.getFactoryFactory();
        final RaceFactory raceFactory = this.game.getRaceFactory();
        final Ware crystals = this.game.getWareFactory().getWare("crystals");
        final Config config = Config.getInstance();
        long currentPrice;
        long price;
        final List<ComplexFactory> backup = new ArrayList<ComplexFactory>();

        // First of all remove all automatically added factories
        this.autoFactories.clear();
        updateShoppingList();

        if (!this.addBaseComplex) return;

        // First of all we build a base complex without specific crystal fab
        // race and remember the price
        while (true)
            if (!addBaseComplex(null)) break;
        currentPrice = getTotalPrice();

        // Now cycle over all races and check if the complex gets cheaper if
        // the crystal fabs are bought from them
        for (final Race race: raceFactory.getRaces())
        {
            // If race is ignored then don't use it
            if (config.isRaceIgnored(race)) continue;

            // If race has no crystal fabs then don't use it
            if (!factoryFactory.hasFactories(race, crystals)) continue;

            // Backup current automatically added factories, clear the
View Full Code Here

Examples of de.netallied.xsd2cppsax.Config

     */
    public static void printCtorDtorImpl(PrintStream stream, String className, String baseClass, boolean initMaps,
            boolean errHandler, IGenerationDataProvider dataProvoider, String ctorParas,
            List<String> initializationList, String ctorTmpl, String dtorTmpl) {

        Config config = dataProvoider.getConfig();

        // c-tor
        stream.println(config.getOutputSourceFileMethodDelimiter());
        stream.print(className + "::" + className + "(");
        if (ctorParas != null) {
            stream.print(" " + ctorParas);
            if (errHandler) {
                stream.print(",");
            } else {
                stream.print(" ");
            }
        }
        if (errHandler) {
            stream.print(" " + config.getNamespace() + "::" + config.getClassNamePublic() + "* impl, "
                    + config.getBaseClassNamespace() + "::");
            stream.println("IErrorHandler* errorHandler ");
        }
        stream.print(")");
        if (errHandler) {
            stream.print(config.getIndentation());
            stream.println(": " + config.getBaseClassNamespace() + "::" + baseClass + "(impl, errorHandler)");
        } else {
            stream.println();
        }

        if (initializationList != null && !initializationList.isEmpty()) {
            stream.print(config.getIndentation());
            if (!errHandler) {
                stream.print(": ");
            } else {
                stream.print(", ");
            }
            stream.println(initializationList.get(0));
            for (int i = 1; i < initializationList.size(); i++) {
                stream.print(config.getIndentation());
                stream.print(", ");
                stream.println(initializationList.get(i));
            }
        }

        stream.println("{");

        if (initMaps) {
            stream.print(config.getIndentation());
            stream.println(createInitFunctionMapMethodName() + "();");
            stream.print(config.getIndentation());
            stream.println(createInitNameMapMethodName() + "();");
        }
        if (ctorTmpl != null) {
            stream.println(TemplateEngine.fillInTemplate(ctorTmpl, null, null, null, null, null, null, dataProvoider));
        }
        stream.println("}");
        stream.println();

        // d-tor
        stream.println(config.getOutputSourceFileMethodDelimiter());
        stream.println(className + "::~" + className + "()");
        stream.println("{");
        if (dtorTmpl != null) {
            stream.println(TemplateEngine.fillInTemplate(dtorTmpl, null, null, null, null, null, null, dataProvoider));
        }
View Full Code Here

Examples of de.sflan.file.symlinker.config.Config

      throw new IllegalArgumentException(MessageFormat.format(
          "Config file {0} does not exist", configPath));
    }
   
    logger.info("Reading configuration ...");
    Config config = readConfig(configPath);
   
    logger.info("Validating configuration ...");
    validateConfig(config);
    FolderWatcher watcher = new FolderWatcher(config);
View Full Code Here

Examples of de.tudresden.ws.conf.Config

  static Log logger;
 
  public static void main (String args[])
  {
 
    conf = new Config();
    if(args.length == 1) conf.read_config(args[0]);
   
      logger = conf.logger;
      logger.write(conf.name + " is going to start", 1);     
           
View Full Code Here

Examples of de.uniol.informatik.vlba.prototype.Config

  public static void main(String[] args) {

    // ---------------- Section: Necessary initializations and
    // registrations-----
    Config config = Config.getInstance();
    PackagingManager.getInstance()
        .registerPackager(new StateOnlyPackager());
    ResourceManager.getInstance().registerResourceProvider(
        new SimpleIntResourceProvider());
    ServiceManager.getInstance().registerService(
        new IntHarvestersHomeService(1000));// here the target value  <----
    ServiceManager.getInstance().registerService(
        new IntHarvestersForeignService());
    try {
      P2PManager.getInstance().registerP2PNetwork(
          (P2PNetwork) Class.forName(config.getP2p_protocol())
              .newInstance());
    } catch (Throwable e) {
      System.out.println(e.getMessage());
    }

    P2PManager.getInstance().connect();

    ContainerManager.getInstance().setContainer(
        SimpleContainer.getInstance());
    ContainerManager.getInstance().getContainer().addContainerListener(
        new SimpleContainerLogComponent());
    ContainerManager.getInstance().getContainer().addContainerListener(SimpleContainer.getInstance().scv);
    MessagingManager.getInstance().registerMessagingProvider(
        new PidginMessageProvider());
    // -----------------End Section-----------------------------------------
   
 
   
    // ---------------- Section: Test Cocoon with XML ----------------------
    try {
      List<Gene> genes = new ArrayList<Gene>();

      genes.add(new FieldGene(SimpleIntHarvester.class
          .getDeclaredField("danceThreshold"), 5));
      genes.add(new FieldGene(SimpleIntHarvester.class
          .getDeclaredField("someString"), "menewstring"));

      genes.add(new MethodGene(1, 1));
      genes.add(new MethodGene(2, 1));
      genes.add(new MethodGene(3, 1));
      genes.add(new MethodGene(4, 1));
      genes.add(new MethodGene(5, 1));
      genes.add(new MethodGene(6, 1));
      genes.add(new MethodGene(7, 1));
      genes.add(new MethodGene(8, 1));
      genes.add(new MethodGene(9, 1));
      genes.add(new MethodGene(10, 1));
      genes.add(new MethodGene(11, 1));

      BeeDNA b = new BeeDNA(genes, "SimpleIntHarvester");

      String repPath = "src/de/uniol/informatik/vlba/intharvesters/unittest/behavior_repository.xml";

      System.out.println("Get a cocoon");
      Cocoon cocoon = new Cocoon(SimpleIntHarvester.class);

      // cocoon.createBees(b, 10, repPath);
      List<Bee> beeslst = cocoon
          .instanciateBees(config.getAgent_number(),
              "de.uniol.informatik.vlba.prototype.agent.Agent_1270717415470");
      SimpleIntHarvester[] bees = (SimpleIntHarvester[]) (beeslst
          .toArray(new SimpleIntHarvester[0]));
     
      //-----------------------------Diversify---
View Full Code Here

Examples of de.uniol.informatik.vlba.purplebee.Config

    /**
     * <p>Default constructor initializing the network.</p>
     */
    public PidginP2P() {
        Config config = Config.getInstance();
        // Connect to DBus and get object of PurpleInterface
        this.connect();
        try
        {
            // read in account
//            BufferedReader in =
//                new BufferedReader(
//                    new InputStreamReader(new FileInputStream("account.txt")));
            BufferedReader in =
                new BufferedReader(
                    new InputStreamReader(new FileInputStream(config.getAccount_file())));
            while (account == 0 && in.ready())
            {
                String line = in.readLine().trim();
                if (line.startsWith("#") || line.equals(""))
                    continue;

                account = po.PurpleAccountsFind(line, "");
                System.out.println("Found account " + account + " with screenname " + line);
            }
            in.close();

        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
       
        // Get all buddies of the used account
        List <Integer>buddies = po.PurpleFindBuddies(account, "");
       
        // TODO Do the neighbors have to be online?
//      // Remove all offline buddies from the list
//      for (Integer buddy : buddies) {
//          if (po.PurpleBuddyIsOnline(buddy.intValue()) == 0) {
//              buddies.remove(buddy);
//          }
//      }
        // copy from List to array
        nodes = new Node[buddies.size()];
        for (int i=0; i<nodes.length; i++) {
            nodes[i] = new PidginP2PNode(buddies.get(i).toString(), this);
        }
        try{
            // read in all nodes
//            BufferedReader in =
//                new BufferedReader(
//                        new InputStreamReader(new FileInputStream("hosts.txt")));
            BufferedReader in =
                new BufferedReader(
                        new InputStreamReader(new FileInputStream(config.getHosts_file())));
            Vector<PidginP2PNode> nodes = new Vector<PidginP2PNode>();
            while (in.ready())
            {
                String line = in.readLine().trim();
                if (line.startsWith("#") || line.equals(""))
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.