Interface CaptureAgentStateService
public interface CaptureAgentStateService
API for the capture-admin service.
-
Method Summary
Modifier and TypeMethodDescriptionReturns an agent by its namegetAgentCapabilities(String agentName) Returns the list of known agent capabilities.getAgentConfiguration(String agentName) Returns the list of known agent configurations.getAgentState(String agentName) Returns the last known agent state by its nameReturns the list of known agents that the current user is authorized to schedule.voidremoveAgent(String agentName) Remove an agent from the system, if the agent exists.booleansetAgentConfiguration(String agentName, Properties capabilities) Sets the capabilities for the specified agentbooleansetAgentState(String agentName, String state) Sets a given agent's state.booleansetAgentUrl(String agentName, String agentUrl)
-
Method Details
-
getAgent
Returns an agent by its name- Parameters:
agentName- The name of the agent.- Returns:
- The agent
- Throws:
org.opencastproject.util.NotFoundException- if no agent with the given name has been found
-
getAgentState
Returns the last known agent state by its name- Parameters:
agentName- The name of the agent.- Returns:
- The agent state
- Throws:
org.opencastproject.util.NotFoundException- if no agent with the given name has been found
-
setAgentState
Sets a given agent's state. Note that this will create the agent if it does not already exist. The state should be defined inAgentState.- Parameters:
agentName- The name of the agent.state- The current state of the agent.- See Also:
-
setAgentUrl
boolean setAgentUrl(String agentName, String agentUrl) throws org.opencastproject.util.NotFoundException - Parameters:
agentName- The name of the agent.agentUrl- The url of the agent.- Throws:
org.opencastproject.util.NotFoundException- if no agent with the given name has been found
-
removeAgent
Remove an agent from the system, if the agent exists.- Parameters:
agentName- The name of the agent.- Throws:
org.opencastproject.util.NotFoundException- if no agent with the given name has been found
-
getKnownAgents
Returns the list of known agents that the current user is authorized to schedule.- Returns:
- A
Mapof name-agent pairs.
-
getAgentCapabilities
Returns the list of known agent capabilities.- Returns:
- A
Propertiesof name-value capability pairs. - Throws:
org.opencastproject.util.NotFoundException- if no agent with the given name has been found
-
getAgentConfiguration
Properties getAgentConfiguration(String agentName) throws org.opencastproject.util.NotFoundException Returns the list of known agent configurations.- Returns:
- A
Propertiesof name-value configuration pairs. - Throws:
org.opencastproject.util.NotFoundException- if no agent with the given name has been found
-
setAgentConfiguration
Sets the capabilities for the specified agent- Parameters:
agentName-capabilities-- Returns:
- One of the constants defined in this class
-