Package org.yamcs
Class YamcsServerInstance
java.lang.Object
org.yamcs.YamcsInstanceService
org.yamcs.YamcsServerInstance
Represents a Yamcs instance together with the instance specific services and the processors
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProcessor
(Processor proc) Adds the processor to the instance.void
doInit()
protected void
doStart()
protected void
doStop()
Returns the main configuration for this Yamcs instanceReturns the first register processor or null if there is no processor registered.int
getMdb()
getMetadata
(Object key) getName()
Returns the name of this Yamcs instancegetProcessor
(String processorName) <T extends YamcsService>
TgetService
(Class<T> serviceClass, String serviceName) Return the service of the given class and name or null if not existing.com.google.common.util.concurrent.Service
getService
(String serviceName) <T extends YamcsService>
List<T>getServices
(Class<T> serviceClass) <T extends YamcsService>
List<ServiceWithConfig>getServicesWithConfig
(Class<T> serviceClass) getServiceWithConfig
(String serviceName) static Spec
getSpec()
void
void
removeProcessor
(String processorName) void
startService
(String serviceName) void
stop()
Stops this instance, and waits until it terminatesMethods inherited from class org.yamcs.YamcsInstanceService
addStateListener, awaitInitialized, awaitOffline, awaitRunning, failureCause, initAsync, notifyFailed, notifyInitialized, notifyStarted, notifyStopped, offline, removeStateListener, startAsync, state, stopAsync, stopping
-
Method Details
-
getSpec
-
doInit
public void doInit()- Specified by:
doInit
in classYamcsInstanceService
-
doStart
protected void doStart()- Specified by:
doStart
in classYamcsInstanceService
-
doStop
protected void doStop()- Specified by:
doStop
in classYamcsInstanceService
-
getMdb
-
stop
Stops this instance, and waits until it terminates- Throws:
IllegalStateException
- if the instance fails to do a clean stop
-
loadTimeService
public void loadTimeService() -
getConfig
Returns the main configuration for this Yamcs instance -
getServiceWithConfig
-
getService
-
getServices
-
getServicesWithConfig
public <T extends YamcsService> List<ServiceWithConfig> getServicesWithConfig(Class<T> serviceClass) -
getService
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
-
getServices
-
startService
public void startService(String serviceName) throws ConfigurationException, ValidationException, InitException -
getName
Returns the name of this Yamcs instance -
getInstanceInfo
-
getTemplate
-
getTemplateSource
-
getTemplateArgs
-
getMetadata
-
getLabels
-
addProcessor
Adds the processor to the instance. If already existing a processor with the same name, an exception is thrown- Parameters:
proc
-- Throws:
ProcessorException
-
getFirstProcessor
Returns the first register processor or null if there is no processor registered.- Returns:
- the first registered processor
-
getProcessors
-
getProcessor
-
removeProcessor
-
getLinkManager
-
getInstanceId
public int getInstanceId()
-