/* * ***** BEGIN LICENSE BLOCK ***** * * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is "Zemberek Sunucu" * * The Initial Developer of the Original Code is * Mehmet D. Akin. * Portions created by the Initial Developer are Copyright (C) 2006 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Serkan Kaba * * ***** END LICENSE BLOCK ***** */ package net.zemberekserver.server; import java.io.FileInputStream; import java.util.Properties; /** * * Genel konfigurasyon bilgileri de burada tutulur. */ public class Config { public static int serverPort; public static boolean useDbus; public static boolean useSockets; public static boolean allowRemote; public static String busName; public static boolean useDbusSystemConnection; private static String keys[] = { "PORT_NUMBER","USE_DBUS","USE_SOCKETS","BUS_NAME","ALLOW_REMOTE","USE_DBUS_SYSTEM_CONNECTION" }; private static Properties properties = null; static { try { properties = new Properties(); String confFile = System.getProperty("ConfigFile"); if(confFile== null) confFile=Defaults.CONFIG_FILE; properties.load(new FileInputStream(confFile)); } catch (Exception e) { e.printStackTrace(); } for(int i=0;i