|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--mucode.abstractions.MuAgent | +--lime.mobileagent.mucode.MobileAgent
This class provides a Lime-enabled mobile agent, on top of µCode
mobile agents. Agents can be migrated using the migrate(java.lang.String)
method, and
automatically retain the content (data and reactions) associated to their
Lime tuple spaces.
For more information about the details of mobile agents int µCode,
please refer to the µCode
SourceForge site.
MuAgent
,
ILimeAgent
, Serialized FormFields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
MobileAgent()
|
|
MobileAgent(mucode.MuServer s)
|
Method Summary | |
abstract void |
doRun()
Must be redefined by the programmer with the behavior of the agent. |
LimeAgentMgr |
getMgr()
Returns the LimeAgentMgr object associated to this agent. |
void |
migrate(java.lang.String destination)
Migrates this agent to the specified destination, expressed as a string host:port . |
void |
migrate(java.lang.String destination,
java.lang.String[] classes,
java.lang.String dynLink,
boolean synch)
Migrates this agent to the specified destination, expressed as a string host:port . |
void |
run()
|
Methods inherited from class mucode.abstractions.MuAgent |
go, go, unpack |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MobileAgent()
public MobileAgent(mucode.MuServer s)
Method Detail |
public LimeAgentMgr getMgr()
LimeAgentMgr
object associated to this agent.getMgr
in interface ILimeAgent
lime.ILimeAgent
public final void migrate(java.lang.String destination) throws java.io.IOException, java.lang.ClassNotFoundException
host:port
. The agent is migrated together with all the
classes it references, except for system classes (including those in
lime.*
, lights.*
) and for ubiquitous classes
(i.e., classes the programmer specifies are available at all servers. See
the µCode documentation
for more details.destination
- specified as host:port
(if the port is
missing, the default µCode port is assumed).java.io.IOException
- if an error occurs during transmission.java.lang.ClassNotFoundException
- if a class cannot be found during agent
serialization.public final void migrate(java.lang.String destination, java.lang.String[] classes, java.lang.String dynLink, boolean synch) throws java.io.IOException, java.lang.ClassNotFoundException
host:port
. The classes migrated with the agent are specified
by their full name in the classes
array. At destination, if
a class is missing it can be retrieved from the server specified in the
dynlink
parameter (a null
value means that
dynamic linking is forbidden). The synch
boolean parameter
specifies whether the invocation is blocking or non-blocking. See the µCode documentation for
more details.destination
- specified as host:port
(if the port is
missing, the default µCode port is assumed).classes
- the fully specified name of all the classes that should be
shipped with the agent.dynlink
- the server from which classes that need to be resolved at
destination can be dynamically linked from.synch
- true
if the invocation is blocking,
false
otherwise (not yet implemented, use
false
).java.io.IOException
- if an error occurs during transmission.java.lang.ClassNotFoundException
- if a class cannot be found during agent
serialization.public final void run()
run
in class mucode.abstractions.MuAgent
public abstract void doRun()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |