Package org.lsst.ccs.services
Class AgentPropertiesService
java.lang.Object
org.lsst.ccs.services.AgentPropertiesService
- All Implemented Interfaces:
ServiceLifecycle,AgentService
A Service to add Properties CCS Agents.
It starts for all agents.
Properties can be set in two ways:
* programmatically using the
setAgentProperty method either in the
HasLifecycle::build or HasLifecycle::init phases.
* via bootstrap properties. These properties must precede the name of
the property to be set with org.lsst.ccs.subsystem.agent.property.
Properties set via the bootstrap method will override any agent property set
programmatically.- Author:
- The LSST CCS Team
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGet the agent properties.Get the Set of agent properties.getAgentProperty(String property) Get an agent property.Get the name of this service.static PropertiesvoidpreBuild()voidpreInit()voidsetAgentProperty(String property, String value) booleanstartForAgent(AgentInfo agentInfo) This method is invoked after an agent service is created to see if this service is to be started for the tiven Agent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lsst.ccs.ServiceLifecycle
afterBuild, afterStart, preShutdown, preStart
-
Constructor Details
-
AgentPropertiesService
public AgentPropertiesService()
-
-
Method Details
-
startForAgent
Description copied from interface:AgentServiceThis method is invoked after an agent service is created to see if this service is to be started for the tiven Agent.- Specified by:
startForAgentin interfaceAgentService- Returns:
- true if the service is to be added to the given agent.
-
getDynamicAgentProperties
-
getAgentServiceName
Description copied from interface:AgentServiceGet the name of this service. This name will be used to add the given service to the lookup tree.- Specified by:
getAgentServiceNamein interfaceAgentService- Returns:
- the AgentService name.
-
setAgentProperty
-
preBuild
public void preBuild()- Specified by:
preBuildin interfaceServiceLifecycle
-
preInit
public void preInit()- Specified by:
preInitin interfaceServiceLifecycle
-
afterInit
public void afterInit()- Specified by:
afterInitin interfaceServiceLifecycle
-
getAgentProperty
Get an agent property.- Parameters:
property- The property name.- Returns:
- The value of the property.
-
getAgentPropertiesKeySet
Get the Set of agent properties.- Returns:
- The Set of available Agent properties.
-
getAgentProperties
Get the agent properties.- Returns:
- The Agent properties.
-