Package common

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


        String myRes = "";
        int Ecode = 0;
        try {
            String ls_str;

            Config myCfg = new Config();
            myCfg.setConfigFile("./deamon/checks/definition.chk");
            String chkComando = myCfg.getProp(comando);

            Process ls_proc = Runtime.getRuntime().exec(chkComando);
            DataInputStream ls_in = new DataInputStream(ls_proc.getInputStream());
            BufferedReader is = new BufferedReader(new InputStreamReader(ls_in));
            while ((ls_str = is.readLine()) != null) {
View Full Code Here

TOP

Related Classes of common.Config

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.