javaweb-servicesagents-jade

Specifying the agent name when starting a JadeGateway Agent


I am trying to do a jade Gateway prog. All is working fine. Except that now i need to have a way of specifying the local name of the Gateway Agent.

Can anyone please help me on this.


Solution

    1. Assuming you start your Jade agent from the command line, what about the option -agents GW:gateway-agent-class of jade.Boot (assuming you want to name your agent "GW")
    2. If creating an instance of JadeGateway class or Agent class, you name the agent when calling createNewAgent() for an AgentContainer instance.
    3. If you use JadeGateway.init() then you only initialize the agent. According to FIPA an INITIALIZED agent has no name. Agent must reach at last ACTIVE state to have a name.
    4. Unfortunately, according to JadeGateway doc: "The activation/termination of this agent (and its underlying container) are completely managed by the JadeGateway class and developers do not need to care about them". So no way to name a JadeGateway? Hm... it is a singleton, anyway.