Interface IAgentService

All Known Implementing Classes:
CacheAgentService, RemoteAgentService

public interface IAgentService
Agent service.

Provides the ability for ActiveMonitor agent to register to the ActiveMonitor server and to discover current agents

Author:
ActiveViam
  • Method Details Link icon

    • getByName Link icon

      IAgentDescription getByName(String name)
      Gets an agent description from its name.
      Parameters:
      name - name of the agent
      Returns:
      the description or null if the agent does not exist
    • checkIn Link icon

      int checkIn(IAgentDescription agentDescription) throws ServiceException
      Register an agent to the ActiveMonitor server.
      Parameters:
      agentDescription - the description of the agent to register
      Returns:
      the identifier of the agent within the ActiveMonitor server
      Throws:
      ServiceException - when any exception occurs
    • checkOut Link icon

      IRegisteredAgentDescription checkOut(int agentId) throws ServiceException
      Unregister an agent from the ActiveMonitor server.
      Parameters:
      agentId - the identifier of the agent within the ActiveMonitor server
      Returns:
      the deleted metadata about the agent
      Throws:
      ServiceException - when any exception occurs
    • getAvailableAgents Link icon

      Collection<? extends IRegisteredAgentDescription> getAvailableAgents()
      Get all the currently registered ActiveMonitor agents' metadata.
      Returns:
      agents's metadata
    • subscribe Link icon

      void subscribe(IAgentListener agentListener)
      A listener wanting to be notified of new agent registration.
      Parameters:
      agentListener - listener on agent registration