Class CodeLocatorListener


  • public abstract class CodeLocatorListener
    extends Object
    Class to subscribe to CodeLocator basic Events.
    Author:
    Jordi Cucurull Juan
    • Constructor Detail

      • CodeLocatorListener

        public CodeLocatorListener()
    • Method Detail

      • handleRegisterAgent

        public void handleRegisterAgent​(AID name,
                                        ClassLoader cl)
        Event triggered when an agent is registered to the CodeLocator.
        Parameters:
        name - Agent Identification of the registered agent.
        cl - ClassLoader associated to the agent.
      • handleUpdateAgent

        public void handleUpdateAgent​(AID name,
                                      ClassLoader clOld,
                                      ClassLoader clNew)
        Event triggered when the associated agent ClassLoader is updated in the CodeLocator.
        Parameters:
        name - Agent Identification of the registered agent.
        clOld - Old ClassLoader associated to the agent.
        clNew - New ClassLoader associated to the agent.
      • handleCloneAgent

        public ClassLoader handleCloneAgent​(AID oldName,
                                            AID newName,
                                            ClassLoader cl)
        Event triggered when an agent is cloned.
        Parameters:
        oldName - Source agent identification.
        newName - Target agent identification.
        cl - ClassLoader associated to the source agent.
        Returns:
        New ClassLoader to the target agent or null to not influence it.
      • handleRemoveAgent

        public void handleRemoveAgent​(AID name,
                                      ClassLoader cl)
        Event triggered when an agent is removed from the CodeLocator.
        Parameters:
        name - Agent Identification of the removed agent.
        cl - ClassLoader associated to the agent.