The CLIManager is a simple console application that extends the Magenta Agent. It doesn’t add much except the ability to interactively send messages to itself and other Agents. This is useful for creating local and remote objects and setting their attributes. Since these objects can also be Agents, the CLIManager can be used as a launcher for other Agents.

To start CLIManager type the following from the magenta-user directory. (if host:port is not specified it defaults to localhost:4444)

  • % java CLIManager [host:port]

Once running you will see the prompt:

  • hostname:port%

Available CLIManager commands:

  • quit
    • exit the CLIManager application, all the contained objects (including other Magenta Agents that have been launched from the manager) will also be destroyed.
  • destination-agent message
    • destination-agent is the the name of a GdmoObject stored by the CLIManager’s ObjectManager?. The object should be either an AgentProxy or a derived class (for example Agent, CLIManager, etc.)
    • message is a CMIP-style action or query (see Protocol)

The CLIManagerThread will send the message to the destination-agent and then display the reply.

  • Example commands
    • localhost:4444% root print
  • Prints the contents of the current Agent’s ObjectManager??
    • localhost:4444% root create*magenta.AgentProxy*root*calcutta
  • Create an AgentProxy called root/calcutta
    • localhost:4444% root set*root/calcutta*HostInfo*www.calcutta.com:4444
  • Set the host:port of the object root/calcutta to www.calcutta.com:4444
    • localhost:4444% root/calcutta print
  • Prints the contents of the Agent listening at www.calcutta.com:4444 (root/calcutta’s HostInfo)