Class Container

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        define serialVersionUID for interoperability
        See Also:
        Constant Field Values
      • entryPoints

        private Vector entryPoints
    • Constructor Detail

      • Container

        public Container()
        This agent cannot be swapped and has a reserved identifier on each agent server.
    • Method Detail

      • addEntryPoint

        public void addEntryPoint​(EntryPoint entryPoint)
      • setLifeCycleListener

        public void setLifeCycleListener​(LifeCycleListener lifeCycleListener)
      • react

        public void react​(AgentId from,
                          Notification not)
                   throws Exception
        Description copied from class: Agent
        Defines the reaction of the agent when receiving a notification. This member function implements the common reactive behavior of an agent, it is called by the execution engine (see Engine class).

        If there is no corresponding reaction, the agent send an UnknownNotification notification to the sender.

        Overrides:
        react in class Agent
        Parameters:
        from - agent sending notification
        not - notification to react to
        Throws:
        Exception - unspecialized exception
      • agentInitialize

        public void agentInitialize​(boolean firstTime)
                             throws Exception
        Description copied from class: Agent
        Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory.

        This function is first called by the factory agent, just after it deploys the agent.

        This function is used by agents with a fixed field set to true to initialize their transient variables, as it is called each time the agent server is restarted.

        This function is not declared final so that derived classes may change their reload policy. The implementation of this method provided by the Agent class just registers the JMS MBean.

        Overrides:
        agentInitialize in class Agent
        Parameters:
        firstTime - true when first called by the factory
        Throws:
        Exception - unspecialized exception
      • agentFinalize

        public void agentFinalize​(boolean lastTime)
        Description copied from class: Agent
        Called to inform this agent that it is garbaged and that it should free any active resources that it has allocated. A subclass of Agent should override this method if it has any operation that it wants to perform before it is garbaged. For example, an agent with threads (a ProxyAgent for example) would use the initialize method to create the threads and the agentFinalize method to stop them.

        Be careful, the notification sending is not allowed in this method.

        The implementation of this method provided by the Agent class just unregister the JMX MBean if needed.

        Overrides:
        agentFinalize in class Agent
        Parameters:
        lastTime - true when last called by the factory on agent deletion.