springs.tests
Class StaticSpringsAgentDynamicRefs
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--springs.agent.SpringsAgent_RMIImpl
|
+--springs.tests.StaticSpringsAgentDynamicRefs
- All Implemented Interfaces:
- ISpringsAgent_RMIImpl, IStaticSpringsAgentDynamicRefs, java.rmi.Remote, java.io.Serializable, SpringsAgent
- public class StaticSpringsAgentDynamicRefs
- extends SpringsAgent_RMIImpl
- implements IStaticSpringsAgentDynamicRefs
A static Springs agent to test dynamic references.
- Author:
- Sergio Ilarri Artigas
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.UnicastRemoteObject |
|
Fields inherited from class java.rmi.server.RemoteServer |
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Method Summary |
void |
initialization()
This method is executed only the first time the agent is created. |
void |
main()
Main method of the agent. |
void |
sayMessage(java.lang.String message)
Prints the given message. |
Methods inherited from class springs.agent.SpringsAgent_RMIImpl |
addObserver, addTaskToSchedule, addTaskToSchedule, addTaskToSchedule, addTaskToSchedule, addTaskToSchedule, afterCreation, afterRemoval, atHome, beforeCreation, beforeRemoval, callAgentMethod, callAgentMethod, callAgentMethodAsynchronously, callAgentMethodAsynchronously, callback, checkpoint, getAddress, getAgentInitializationTime, getAgentMoving, getArgsCallbackMethod, getCallbackMethod, getCodebase, getContextInterfaceForAgents, getContextName, getHomeAddress, getHostname, getLocationServers, getMillisStay, getMillisWhenCreated, getName, getNameWithContext, getNumObservers, getObservers, getObserversAddresses, getPort, getSchedule, getSequenceNumberForAddressUpdateMessages, getURL, goHome, goHome, goHome, handleMessage, hasCallbackMethod, increaseSequenceNumberForAddressUpdateMessages, initializationAfterMovement, isSuspended, justCreatedForTheFirstTime, moreTasksInSchedule, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveToURL, moveToURL, moveToURL, moveToURL, postArrival, postDeparture, preArrival, preDeparture, receiveMethodCall, recordEndStay, recordStartStay, remove, removeObserver, sendAsynchronousMessage, sendMessage, sendMessage, setAgentInitializationTime, setAgentMoving, setCacheReferences, setCallbackMethod, setCodebase, setContextInterfaceForAgents, setHomeAddress, setLocationServers, setName, start, suspend, takeNextTask |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
_nameTargetAgent
private java.lang.String _nameTargetAgent
NUM_INVOKATIONS_TO_PERFORM
public static int NUM_INVOKATIONS_TO_PERFORM
MILLIS_BETWEEN_INVOKATIONS
public static long MILLIS_BETWEEN_INVOKATIONS
_numRemoteInvocationsPerformed
private int _numRemoteInvocationsPerformed
_startingMillis
private long _startingMillis
StaticSpringsAgentDynamicRefs
public StaticSpringsAgentDynamicRefs(java.lang.String nameTargetAgent)
throws java.rmi.RemoteException,
CommunicationException,
AgentNotFoundException
- Constructor.
- Parameters:
nameTargetAgent
- the name of the target agent.
- Throws:
java.rmi.RemoteException
- if error.
CommunicationException
AgentNotFoundException
- See Also:
String
,
RemoteException
initialization
public void initialization()
throws java.lang.Exception
- Description copied from interface:
SpringsAgent
- This method is executed only the first time the agent is created.
The programmer can override this method to include initialization code.
However, make sure to call first the method in the superclass!
- Specified by:
initialization
in interface SpringsAgent
- Overrides:
initialization
in class SpringsAgent_RMIImpl
- Throws:
java.lang.Exception
- if error.- See Also:
Exception
main
public void main()
- Main method of the agent.
- Specified by:
main
in interface SpringsAgent
- Overrides:
main
in class SpringsAgent_RMIImpl
sayMessage
public void sayMessage(java.lang.String message)
throws java.rmi.RemoteException
- Description copied from interface:
IStaticSpringsAgentDynamicRefs
- Prints the given message.
- Specified by:
sayMessage
in interface IStaticSpringsAgentDynamicRefs
- Parameters:
message
- the message.
java.rmi.RemoteException
- See Also:
String
,
RemoteException