Package org.yamcs

Class YamcsServerInstance

java.lang.Object
org.yamcs.YamcsInstanceService
org.yamcs.YamcsServerInstance

public class YamcsServerInstance extends YamcsInstanceService
Represents a Yamcs instance together with the instance specific services and the processors
  • Method Details

    • getSpec

      public static Spec getSpec()
    • doInit

      public void doInit()
      Specified by:
      doInit in class YamcsInstanceService
    • doStart

      protected void doStart()
      Specified by:
      doStart in class YamcsInstanceService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class YamcsInstanceService
    • getMdb

      public Mdb getMdb()
    • stop

      public void stop() throws IllegalStateException
      Stops this instance, and waits until it terminates
      Throws:
      IllegalStateException - if the instance fails to do a clean stop
    • loadTimeService

      public void loadTimeService()
    • getConfig

      public YConfiguration getConfig()
      Returns the main configuration for this Yamcs instance
    • getServiceWithConfig

      public ServiceWithConfig getServiceWithConfig(String serviceName)
    • getService

      public com.google.common.util.concurrent.Service getService(String serviceName)
    • getServices

      public <T extends YamcsService> List<T> getServices(Class<T> serviceClass)
    • getServicesWithConfig

      public <T extends YamcsService> List<ServiceWithConfig> getServicesWithConfig(Class<T> serviceClass)
    • getService

      public <T extends YamcsService> T getService(Class<T> serviceClass, String serviceName)
      Return the service of the given class and name or null if not existing.

      If a service of the given name but a different class exists (or the other way around), this function returns null.

      Parameters:
      serviceClass -
      serviceName -
      Returns:
    • getTimeService

      public TimeService getTimeService()
    • getServices

      public List<ServiceWithConfig> getServices()
    • startService

      public void startService(String serviceName) throws ConfigurationException, ValidationException, InitException
      Throws:
      ConfigurationException
      ValidationException
      InitException
    • getName

      public String getName()
      Returns the name of this Yamcs instance
    • getInstanceInfo

      public org.yamcs.protobuf.YamcsInstance getInstanceInfo()
    • getTemplate

      public String getTemplate()
    • getTemplateSource

      public String getTemplateSource()
    • getTemplateArgs

      public Map<String,Object> getTemplateArgs()
    • getMetadata

      public Object getMetadata(Object key)
    • getLabels

      public Map<String,String> getLabels()
    • addProcessor

      public void addProcessor(Processor proc) throws ProcessorException
      Adds the processor to the instance. If already existing a processor with the same name, an exception is thrown
      Parameters:
      proc -
      Throws:
      ProcessorException
    • getFirstProcessor

      public Processor getFirstProcessor()
      Returns the first register processor or null if there is no processor registered.
      Returns:
      the first registered processor
    • getProcessors

      public List<Processor> getProcessors()
    • getProcessor

      public Processor getProcessor(String processorName)
    • removeProcessor

      public void removeProcessor(String processorName)
    • getLinkManager

      public LinkManager getLinkManager()
    • getInstanceId

      public int getInstanceId()