--- experimental/agents/Station.java 2001/04/23 19:45:18 1.1 +++ experimental/agents/Station.java 2001/05/04 02:04:35 1.2 @@ -1,6 +1,77 @@ -import java.util.*; +//---PACKAGE DECLARATION--- +//---IMPORTS--- +import java.util.ArrayList; + +/** + * The Station class defines the operations that a compliant station should + * implement + * + * @author $Author: ajm $ + * @version $Id: Station.java,v 1.2 2001/05/04 02:04:35 ajm Exp $ + */ abstract class Station { + +//---FINAL / FINAL STATIC ATTRIBUTES--- + + /** + * The current CVS revision of this class + */ + public static final String REVISION = "$Revision: 1.2 $"; + +//---STATIC METHODS--- + +//---CONSTRUCTORS--- + +//---PUBLIC METHODS--- + public abstract ArrayList getAllAgents(); + + public abstract ArrayList getAllPeers(); + public abstract String getName(); + + public abstract void sendAgent(Agent agent, PeerHandler Peer); + + /** + * 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.FormatName class + * to format the toString() + * + * @return the name of this class and its CVS revision + */ + public String toString() { + return FormatName.getName( + _name, + getClass().getName(), + REVISION); + } + +//---PRIVATE/PROTECTED METHODS--- + +//---ACCESSOR/MUTATOR METHODS--- + +//---ATTRIBUTES--- + + /** + * 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 String _name = null; + + /** + * This holds a reference to the + * system logger that is being used. + */ + private Logger _logger = Logger.getInstance(); + +//---STATIC ATTRIBUTES--- + } \ No newline at end of file