1 |
< |
abstract class Agent implements Runnable { |
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$ |
11 |
> |
* @version $Id$ |
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$"; |
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 |
|
} |