--- projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterServant.java 2000/11/30 02:38:09 1.10 +++ projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterServant.java 2000/12/13 13:36:46 1.11 @@ -8,10 +8,10 @@ import uk.ac.ukc.iscream.util.*; import java.net.InetAddress; /** - * A test FilterServant, just prints it out. + * Passes inbound data from other Filters to a FilterThread * * @author $Author: ajm $ - * @version $Id: FilterServant.java,v 1.10 2000/11/30 02:38:09 ajm Exp $ + * @version $Id: FilterServant.java,v 1.11 2000/12/13 13:36:46 ajm Exp $ */ class FilterServant extends FilterPOA { @@ -20,7 +20,7 @@ class FilterServant extends FilterPOA { /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.10 $"; + public final String REVISION = "$Revision: 1.11 $"; //---STATIC METHODS--- @@ -53,24 +53,39 @@ class FilterServant extends FilterPOA { * Overrides the {@link java.lang.Object#toString() Object.toString()} * method to provide clean logging (every class should have this). * + * This uses the uk.ac.ukc.iscream.util.NameFormat class + * to format the toString() + * * @return the name of this class and its CVS revision */ public String toString() { - return this.getClass().getName() + "{" + _name + "}(" + REVISION.substring(11, REVISION.length() - 2) + ")"; + return FormatName.getName( + _name, + getClass().getName(), + REVISION); } //---PRIVATE METHODS--- //---ACCESSOR/MUTATOR METHODS--- + /** + * Provides information to the FilterManager + */ public String getUDPPort() { return new Integer(_UDPListenPort).toString(); } + /** + * Provides information to the FilterManager + */ public String getTCPPort() { return new Integer(_TCPListenPort).toString(); } + /** + * Provides information to the FilterManager + */ public String getHostName() { try { return InetAddress.getLocalHost().getHostName(); @@ -84,21 +99,35 @@ class FilterServant extends FilterPOA { //---ATTRIBUTES--- /** - * Reference to a Logger + * This is the friendly identifier of the + * component this class is running in. + * eg, a Filter may be called "filter1", + * If this class does not have an owning + * component, a name from the configuration + * can be placed here. This name could also + * be changed to null for utility classes. */ - private Logger _logger = ReferenceManager.getInstance().getLogger(); - + private String _name = FilterMain.NAME; + /** - * Our name + * This holds a reference to the + * system logger that is being used. */ - private String _name = ReferenceManager.getInstance().getName(); + private Logger _logger = ReferenceManager.getInstance().getLogger(); /** * Our parent filter */ private Filter _parent; + /** + * The UDP port we're listening on + */ private int _UDPListenPort; + + /** + * The TCP port we're listening on + */ private int _TCPListenPort; //---STATIC ATTRIBUTES---