Revision: | 1.2 |
Committed: | Fri May 4 02:04:35 2001 UTC (23 years, 6 months ago) by ajm |
Branch: | MAIN |
CVS Tags: | HEAD |
Changes since 1.1: | +46 -1 lines |
Error occurred while calculating annotation data. | |
Log Message: | Loads of new framework but far from complete. The BasicAgent class is as it says, a basic agent, with ability to be run from the command line to fire it into an agentstation. AgentStations now have support for adding and removing agents and support for multiple listeners. Also initial support for peer agent stations. Attempted support at peer -> peer agent transfer, but run into problems. Still no bytecode transfer, but location and method has been figured out. The AgentSystem class is now the bootstrap class for an agent station. It brings up the AgentStation (which is now singleton) and the Logger (also singleton - using standard i-scream logging techniques). It is possible to specify a peer station that the booting agent station should connect to. Initial TODO: agent class loader agent bytecode transfer solve peer -> peer problems - possibly by creating extra socket to send agent, but shouldn't really be needed |
# | Content |
---|---|
1 | //---PACKAGE DECLARATION--- |
2 | |
3 | //---IMPORTS--- |
4 | import java.io.Serializable; |
5 | |
6 | /** |
7 | * The agent abstract class defines the operations that a compliant |
8 | * agent should implement. |
9 | * |
10 | * @author $Author: tdb1 $ |
11 | * @version $Id: TemplateClass.java,v 1.11 2001/03/22 21:50:41 tdb1 Exp $ |
12 | */ |
13 | abstract class Agent implements Runnable, Serializable { |
14 | |
15 | //---FINAL / FINAL STATIC ATTRIBUTES--- |
16 | |
17 | /** |
18 | * The current CVS revision of this class |
19 | */ |
20 | public static final String REVISION = "$Revision: 1.11 $"; |
21 | |
22 | //---STATIC METHODS--- |
23 | |
24 | //---CONSTRUCTORS--- |
25 | |
26 | //---PUBLIC METHODS--- |
27 | |
28 | public abstract void onArrival(Station station); |
29 | |
30 | public abstract String getName(); |
31 | |
32 | public abstract long getTransmissionCount(); |
33 | |
34 | public abstract void greet(Agent agent); |
35 | |
36 | public abstract void shutdown(); |
37 | |
38 | //---PRIVATE/PROTECTED METHODS--- |
39 | |
40 | //---ACCESSOR/MUTATOR METHODS--- |
41 | |
42 | //---ATTRIBUTES--- |
43 | |
44 | /** |
45 | * The name of the agent |
46 | */ |
47 | private String _name = null; |
48 | |
49 | //---STATIC ATTRIBUTES--- |
50 | |
51 | } |