--- projects/cms/source/host/java/Config.java 2000/11/30 17:32:18 1.4 +++ projects/cms/source/host/java/Config.java 2002/05/18 18:15:57 1.9 @@ -1,3 +1,22 @@ +/* + * i-scream central monitoring system + * Copyright (C) 2000-2002 i-scream + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + //---PACKAGE DECLARATION--- //---IMPORTS--- @@ -8,11 +27,11 @@ import java.io.*; /** * Configurator object for the JavaHost - * Will connect to the configurator manager and collect its specific + * Will connect to the filter manager and collect its specific * configuration * - * @author $Author: ab11 $ - * @version $Id: Config.java,v 1.4 2000/11/30 17:32:18 ab11 Exp $ + * @author $Author: tdb $ + * @version $Id: Config.java,v 1.9 2002/05/18 18:15:57 tdb Exp $ */ class Config { @@ -62,7 +81,7 @@ class Config { //---PUBLIC METHODS--- public InetAddress getFilterName(){ - // will return the most recient IP address (if it is dynamic for whatever reason + // will return the most recent IP address (if it is dynamic for whatever reason) try { return InetAddress.getByName(filterName); } @@ -76,7 +95,7 @@ class Config { /** * Used to retrieve the port to send UDP packets to on the filter * - * @return an integer corrisponding to the UDP port of the filter + * @return an integer corresponding to the UDP port of the filter */ public int getFilterUDPPort(){ @@ -86,7 +105,7 @@ class Config { /** * Used to retrieve the port to send TCP heartbeats to on the filter * - * @return an integer corrisponding to the TCP of the filter + * @return an integer corresponding to the TCP of the filter */ public int getFilterTCPPort(){ @@ -118,7 +137,7 @@ class Config { Socket mySocket; configChanged = false; - System.out.println("Establishing connection with config manager"); + System.out.println("Establishing connection with filter manager"); // might throw a UnknownHostException try { @@ -131,8 +150,10 @@ class Config { // everything is fine // sendCommand("LASTMODIFIED"); lastModified = sendCommand("LASTMODIFIED"); - + fileList = sendCommand("FILELIST"); + + fQDN = sendCommand("FQDN"); // get all the properties if ( numProperties > 0 ){ // sendCommand("CONFIG"); @@ -156,7 +177,7 @@ class Config { // close the socket mySocket.close(); - System.out.println("Completed communication with config manager"); + System.out.println("Completed communication with filter manager"); } catch ( UnknownHostException e ){ @@ -245,6 +266,7 @@ class Config { private boolean configChanged; private String lastModified; private String fileList; + private String fQDN; private int numProperties; private HashMap myProperties; private String filterName; @@ -259,4 +281,4 @@ class Config { //---STATIC ATTRIBUTES--- -} // class \ No newline at end of file +} // class