Class AgentPropertiesService

java.lang.Object
org.lsst.ccs.services.AgentPropertiesService
All Implemented Interfaces:
ServiceLifecycle, AgentService

public class AgentPropertiesService extends Object implements 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
  • Constructor Details

    • AgentPropertiesService

      public AgentPropertiesService()
  • Method Details

    • startForAgent

      public boolean startForAgent(AgentInfo agentInfo)
      Description copied from interface: AgentService
      This method is invoked after an agent service is created to see if this service is to be started for the tiven Agent.
      Specified by:
      startForAgent in interface AgentService
      Returns:
      true if the service is to be added to the given agent.
    • getDynamicAgentProperties

      public static Properties getDynamicAgentProperties()
    • getAgentServiceName

      public String getAgentServiceName()
      Description copied from interface: AgentService
      Get the name of this service. This name will be used to add the given service to the lookup tree.
      Specified by:
      getAgentServiceName in interface AgentService
      Returns:
      the AgentService name.
    • setAgentProperty

      public void setAgentProperty(String property, String value)
    • preBuild

      public void preBuild()
      Specified by:
      preBuild in interface ServiceLifecycle
    • preInit

      public void preInit()
      Specified by:
      preInit in interface ServiceLifecycle
    • afterInit

      public void afterInit()
      Specified by:
      afterInit in interface ServiceLifecycle
    • getAgentProperty

      public String getAgentProperty(String property)
      Get an agent property.
      Parameters:
      property - The property name.
      Returns:
      The value of the property.
    • getAgentPropertiesKeySet

      public Set getAgentPropertiesKeySet()
      Get the Set of agent properties.
      Returns:
      The Set of available Agent properties.
    • getAgentProperties

      public Properties getAgentProperties()
      Get the agent properties.
      Returns:
      The Agent properties.