agentland.debug
Class AgentPoke
java.lang.Object
|
+--agentland.debug.AgentPoke
- public class AgentPoke
- extends Object
Commandline program to Call up an agent (if it is running), poke it
with a method call, and then bail. If no method is supplied, it just
runs the agent.
Usage: AgentPoke [] []
This can also be run from something other than the command line,
but using code akin to the following:
AgentPoke ap = new AgentPoke();
ap.setup( societyString, catalogHost );
ap.setTarget( agentName );
ap.pokeWithArgs( method, args[] );
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AgentPoke
public AgentPoke()
AgentPoke
public AgentPoke(Agent pop)
AgentPoke
public AgentPoke(Agent pop,
String method,
String params)
getTarget
public Agent getTarget()
setTarget
public void setTarget(Agent target)
setTarget
public void setTarget(String agentName)
setup
public void setup(String society,
String catHost)
- Sets up the connection to Metaglue's catalog and such so that we
can look up agents.
poke
public Object poke(String method,
String params)
throws CallerFailedException
pokeWithArgs
public Object pokeWithArgs(String method,
String[] args)
throws CallerFailedException
testCatalog
public void testCatalog()
- Test methods
getSocietyFromString
public static String getSocietyFromString(String s)
- Static helper methods; originally for the main program
getOccupationFromString
public static String getOccupationFromString(String name)
getDesignationFromString
public static String getDesignationFromString(String s)
findAgent
public static Agent findAgent(AgentAgent pop,
String agent)
combineArgs
public static String combineArgs(String[] args)
- Here we combine all the arguments into one string. I think we do
this to make it look like the AgentTester call, so this should
probably be reworked not to do this in the future.
combineArgs
public static String combineArgs(String[] args,
int offset)
main
public static void main(String[] args)