Package com.qfs.snl.agent
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 Summary
Modifier and TypeMethodDescriptionint
checkIn
(IAgentDescription agentDescription) Register an agent to the ActiveMonitor server.checkOut
(int agentId) Unregister an agent from the ActiveMonitor server.Collection
<? extends IRegisteredAgentDescription> Get all the currently registered ActiveMonitor agents'metadata
.Gets an agent description from its name.void
subscribe
(IAgentListener agentListener) A listener wanting to be notified of new agent registration.
-
Method Details
-
getByName
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
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
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
Collection<? extends IRegisteredAgentDescription> getAvailableAgents()Get all the currently registered ActiveMonitor agents'metadata
.- Returns:
- agents's metadata
-
subscribe
A listener wanting to be notified of new agent registration.- Parameters:
agentListener
- listener on agent registration
-