Package org.yamcs
Class AbstractYamcsService
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractService
-
- org.yamcs.AbstractYamcsService
-
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
,YamcsService
- Direct Known Subclasses:
AlarmRecorder
,CcsdsTmIndex
,CfdpService
,CfsEventDecoder
,CommandHistoryRecorder
,EventRecorder
,HttpServer
,ParameterArchive
,ParameterRecorder
,ProcessorCreatorService
,ProcessRunner
,ReplayServer
,ReplicationMaster
,ReplicationServer
,ReplicationSlave
,SystemParametersCollector
,TimeCorrelationService
,XtceTmRecorder
public abstract class AbstractYamcsService extends com.google.common.util.concurrent.AbstractService implements YamcsService
-
-
Field Summary
Fields Modifier and Type Field Description protected YConfiguration
config
protected Log
log
protected String
serviceName
protected String
yamcsInstance
-
Constructor Summary
Constructors Constructor Description AbstractYamcsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YConfiguration
getConfig()
String
getYamcsInstance()
void
init(String yamcsInstance, String serviceName, YConfiguration config)
Initialize this service.-
Methods inherited from class com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, doStart, doStop, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Methods inherited from interface org.yamcs.YamcsService
getSpec, init
-
-
-
-
Field Detail
-
yamcsInstance
protected String yamcsInstance
-
serviceName
protected String serviceName
-
config
protected YConfiguration config
-
log
protected Log log
-
-
Method Detail
-
init
public void init(String yamcsInstance, String serviceName, YConfiguration config) throws InitException
Description copied from interface:YamcsService
Initialize this service. This is called before the service is started. All operations should finish fast.- Specified by:
init
in interfaceYamcsService
- Parameters:
yamcsInstance
- The yamcs instance, or null if this is a global service.serviceName
- The service name.config
- The configured arguments for this service. IfYamcsService.getSpec()
is implemented then this contains the arguments after being validated (including any defaults).- Throws:
InitException
- When something goes wrong during the execution of this method.
-
getYamcsInstance
public String getYamcsInstance()
-
getConfig
public YConfiguration getConfig()
-
-