|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--springs.agent.SpringsAgent_RMIImpl | +--springs.tests.MovingSpringsHelloAgent
A Springs agent that moves around and writes "hello world" in the standard output.
Field Summary | |
private int |
_numTravelsPerformed
|
static int |
NUM_TRAVELS_TO_PERFORM
|
static boolean |
RETURN_HOME
|
static int[] |
TARGET_PORTS
|
static java.lang.String[] |
TARGET_URLS
|
Fields inherited from class springs.agent.SpringsAgent_RMIImpl |
_numberOfJumps |
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 |
Fields inherited from interface springs.agent.SpringsAgent |
METHOD_MESSAGE_RECEPTION |
Fields inherited from interface springs.agent.ISpringsAgent_RMIImpl |
ADD_OBSERVER_METHOD, REMOVE_OBSERVER_METHOD |
Constructor Summary | |
MovingSpringsHelloAgent()
|
Method Summary | |
void |
afterCreation()
Method called just after creating the agent on a certain context. |
void |
afterRemoval()
Method called just after removing the agent from a certain context. |
void |
beforeCreation()
Method called just before creating the agent on a certain context. |
void |
beforeRemoval()
Method called just before removing the agent from a certain context. |
void |
endTravels()
End of travels. |
void |
endTravelsWithWill(java.lang.String willReceiver)
End of travels. |
void |
main()
Main method of the agent. |
void |
main1()
All the agent's task in a single method and using a status variable to keep track of the number of trips performed. |
void |
postArrival()
It executes after the agent has arrived at the destination. |
void |
postDeparture()
It executes on the original stale object at the source, and is typically defined to perform activities such as removing the stale object from persistence. |
void |
preArrival()
This method is executed on the copy of the object at the destination. |
void |
preDeparture(java.lang.String originContext,
java.lang.String targetContext)
This method is executed on the original object at the source. |
void |
travel1()
The first travel. |
void |
travel2()
The second travel. |
void |
travel3()
The third travel. |
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 |
Field Detail |
public static boolean RETURN_HOME
public static int NUM_TRAVELS_TO_PERFORM
public static java.lang.String[] TARGET_URLS
public static int[] TARGET_PORTS
private int _numTravelsPerformed
Constructor Detail |
public MovingSpringsHelloAgent() throws java.rmi.RemoteException
Method Detail |
public void main()
main
in interface SpringsAgent
main
in class SpringsAgent_RMIImpl
public void main1()
public void travel1()
public void travel2()
public void travel3()
public void endTravels()
public void endTravelsWithWill(java.lang.String willReceiver)
willReceiver
- the name of the person that will get the possessions of the agent
(nothing!) after it dies.String
public void beforeCreation()
SpringsAgent
beforeCreation
in interface SpringsAgent
beforeCreation
in class SpringsAgent_RMIImpl
public void afterCreation()
SpringsAgent
afterCreation
in interface SpringsAgent
afterCreation
in class SpringsAgent_RMIImpl
public void beforeRemoval()
SpringsAgent
beforeRemoval
in interface SpringsAgent
beforeRemoval
in class SpringsAgent_RMIImpl
public void afterRemoval()
SpringsAgent
afterRemoval
in interface SpringsAgent
afterRemoval
in class SpringsAgent_RMIImpl
public void postArrival()
SpringsAgent
postArrival
in interface SpringsAgent
postArrival
in class SpringsAgent_RMIImpl
public void postDeparture()
SpringsAgent
postDeparture
in interface SpringsAgent
postDeparture
in class SpringsAgent_RMIImpl
public void preArrival()
SpringsAgent
preArrival
in interface SpringsAgent
preArrival
in class SpringsAgent_RMIImpl
public void preDeparture(java.lang.String originContext, java.lang.String targetContext)
SpringsAgent
preDeparture
in interface SpringsAgent
preDeparture
in class SpringsAgent_RMIImpl
originContext
- the origin context.targetContext
- the target context.String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |