ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/agents/BasicAgent.java
(Generate patch)

Comparing experimental/agents/BasicAgent.java (file contents):
Revision 1.2 by ajm, Fri May 4 02:04:35 2001 UTC vs.
Revision 1.3 by ajm, Sun May 6 19:01:48 2001 UTC

# Line 83 | Line 83 | class BasicAgent extends Agent {
83                  PeerHandler dstPeer = (PeerHandler) peers.get(0);
84                  _station.sendAgent(this, dstPeer);
85              }
86            say("No peers to move to...staying here.");
86          }
87      }
88      
# Line 92 | Line 91 | class BasicAgent extends Agent {
91      public void onArrival(Station station) {
92          _transmissionCount++;
93          _station = station;
94 +        _running = true;
95          say("Just arrived at - " + _station.getName());
96      }
97  
# Line 115 | Line 115 | class BasicAgent extends Agent {
115       * Used to shutdown this thread
116       */
117      public void shutdown() {
118 +        say("shutting down");
119          _station = null;
120          _running = false;
121      }
122      
123      //*** OTHER PUBLIC METHODS ***
124 <
124 >    
125   //---PRIVATE/PROTECTED METHODS---
126 +
127 +    /**
128 +     * Overridden for debugging purposes
129 +     * to see when an instance of this class
130 +     * is destroyed
131 +     */
132 +    protected void finalize() throws Throwable {
133 +        say("dead - just been gc'd");
134 +    }
135  
136   //---ACCESSOR/MUTATOR METHODS---
137  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines