Class AgentImpl
java.lang.Object
org.opencastproject.capture.admin.impl.AgentImpl
- All Implemented Interfaces:
org.opencastproject.capture.admin.api.Agent
@Entity
public class AgentImpl
extends Object
implements org.opencastproject.capture.admin.api.Agent
An in-memory construct to represent the state of a capture agent, and when it was last heard from.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe capabilities the agent has Capabilities are the devices this agent can record from, with a friendly name associated to determine their nature (e.g.protected LongThe time at which the agent last checked in with this service.protected StringThe name of the agent.protected StringThe roles allowed to schedule this agentprotected StringThe state of the agent.protected StringThe URL of the agent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()getState()getUrl()inthashCode()voidsetConfiguration(Properties configuration) voidsetLastHeardFrom(Long time) voidsetOrganization(String organization) voidsetSchedulerRoles(Set<String> schedulerRoles) voidvoid
-
Field Details
-
name
The name of the agent. -
state
The state of the agent. This should be defined from the constants in AgentState. -
url
The URL of the agent. This is determined from the referer header parameter when the agent is registered. -
organization
-
lastHeardFrom
The time at which the agent last checked in with this service. Note that this is an absolute timestamp (ie, milliseconds since 1970) rather than a relative timestamp (ie, it's been 3000 ms since it last checked in). -
schedulerRoles
The roles allowed to schedule this agent -
configurationString
The capabilities the agent has Capabilities are the devices this agent can record from, with a friendly name associated to determine their nature (e.g. PRESENTER --> dev/video0)
-
-
Constructor Details
-
AgentImpl
public AgentImpl()Required 0-arg constructor for JAXB, creates a blank agent. -
AgentImpl
public AgentImpl(String agentName, String organization, String agentState, String agentUrl, Properties configuration) Builds a representation of the agent.- Parameters:
agentName- The name of the agent.organization- The organization identifier to which this agent belongsagentState- The state of the agent. This should be defined from the constants in AgentStateconfiguration- The configuration of the agent.
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
setState
- Specified by:
setStatein interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
getState
- Specified by:
getStatein interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
setUrl
- Specified by:
setUrlin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
getUrl
- Specified by:
getUrlin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
setLastHeardFrom
- Specified by:
setLastHeardFromin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
getLastHeardFrom
- Specified by:
getLastHeardFromin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
getCapabilities
- Specified by:
getCapabilitiesin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
getConfiguration
- Specified by:
getConfigurationin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
getSchedulerRoles
- Returns:
- the schedulerRoles
-
setSchedulerRoles
- Parameters:
schedulerRoles- the schedulerRoles to set
-
getOrganization
- Returns:
- the organization
-
setOrganization
- Parameters:
organization- the organization to set
-
setConfiguration
- Specified by:
setConfigurationin interfaceorg.opencastproject.capture.admin.api.Agent- See Also:
-
equals
-
hashCode
public int hashCode()
-