Interface CaptureAgentStateService


public interface CaptureAgentStateService
API for the capture-admin service.
  • Method Details

    • getAgent

      Agent getAgent(String agentName) throws org.opencastproject.util.NotFoundException
      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

      String getAgentState(String agentName) throws org.opencastproject.util.NotFoundException
      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

      boolean setAgentState(String agentName, String state)
      Sets a given agent's state. Note that this will create the agent if it does not already exist. The state should be defined in AgentState.
      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

      void removeAgent(String agentName) throws org.opencastproject.util.NotFoundException
      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

      Map<String,Agent> getKnownAgents()
      Returns the list of known agents that the current user is authorized to schedule.
      Returns:
      A Map of name-agent pairs.
    • getAgentCapabilities

      Properties getAgentCapabilities(String agentName) throws org.opencastproject.util.NotFoundException
      Returns the list of known agent capabilities.
      Returns:
      A Properties of 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 Properties of name-value configuration pairs.
      Throws:
      org.opencastproject.util.NotFoundException - if no agent with the given name has been found
    • setAgentConfiguration

      boolean setAgentConfiguration(String agentName, Properties capabilities)
      Sets the capabilities for the specified agent
      Parameters:
      agentName -
      capabilities -
      Returns:
      One of the constants defined in this class