Interface Agent

All Known Implementing Classes:
AgentImpl

public interface Agent
An in-memory construct to represent the state of a capture agent, and when it was last heard from.
  • Method Details

    • getName

      String getName()
      Gets the name of the agent.
      Returns:
      The name of the agent.
    • setState

      void setState(String newState)
      Sets the state of the agent, and updates the time it was last heard from.
      Parameters:
      newState - The new state of the agent. This should defined from the constants in AgentState. This can be equal to the current one if the goal is to update the timestamp.
      See Also:
    • getState

      String getState()
      Gets the state of the agent.
      Returns:
      The state of the agent. This should be defined from the constants in AgentState.
      See Also:
    • setUrl

      void setUrl(String agentUrl)
      Sets the url of the agent.
      Parameters:
      agentUrl - The url of the agent as determined by the referer header field of its request while registering
    • getUrl

      String getUrl()
      Gets the url of the agent.
      Returns:
      the url of the agent.
    • setLastHeardFrom

      void setLastHeardFrom(Long time)
      Sets the time at which the agent last checked in.
      Parameters:
      time - The number of milliseconds since 1970 when the agent last checked in.
    • getLastHeardFrom

      Long getLastHeardFrom()
      Gets the time at which the agent last checked in.
      Returns:
      The number of milliseconds since 1970 when the agent last checked in.
    • getCapabilities

      Properties getCapabilities()
      Gets the capture agent's capability list.
      Returns:
      The agent's capabilities, or null if there is an error.
    • getConfiguration

      Properties getConfiguration()
      Gets the capture agent's full configuration list.
      Returns:
      The agent's configuration, or null if there is an error.
    • setConfiguration

      void setConfiguration(Properties configuration)
      Sets the capture agent's configuration list.
      Parameters:
      configuration - The agent's configuration.