Class SynchronousAgent

    • Field Detail

      • logger

        private static final Logger logger
        Deprecated.
      • DEBUG

        private static final boolean DEBUG
        Deprecated.
      • serialVersionUID

        private static final long serialVersionUID
        Deprecated.
        See Also:
        Constant Field Values
      • nextReqMsgId

        private int nextReqMsgId
        Deprecated.
    • Constructor Detail

      • SynchronousAgent

        public SynchronousAgent()
        Deprecated.
    • Method Detail

      • agentInitialize

        protected void agentInitialize​(boolean firstTime)
                                throws Exception
        Deprecated.
        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)
        Deprecated.
        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.
      • deleteQueueMessage

        public boolean deleteQueueMessage​(String queueName,
                                          String msgId)
                                   throws InterruptedException
        Deprecated.
        Delete a message in a queue
        Parameters:
        queueName - Name of the queue
        msgId - ID of the message to be deleted
        Returns:
        Throws:
        InterruptedException
      • deleteSubMessage

        public boolean deleteSubMessage​(String userName,
                                        String subName,
                                        String msgId)
                                 throws InterruptedException
        Deprecated.
        Deletes a message in a subscription
        Parameters:
        userName - Subscriber's name
        subName - Subscription name
        msgId - ID of the message to be deleted
        Returns:
        Throws:
        InterruptedException
      • clearSubscription

        public boolean clearSubscription​(String userName,
                                         String subName)
                                  throws InterruptedException
        Deprecated.
        Clears all pending message of a subscription
        Parameters:
        userName - Subscriber's name
        subName - Subscription name
        Returns:
        Throws:
        InterruptedException
      • nextReqMsgId

        private String nextReqMsgId()
        Deprecated.
      • react

        public void react​(AgentId from,
                          Notification not)
                   throws Exception
        Deprecated.
        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