org.yamcs.ServiceWithConfig Maven / Gradle / Ivy
package org.yamcs;
/**
* Holder for a service together with its name and config. Services are used at three levels:
*
* - Yamcs server global services
*
- Yamcs instance specific services
*
- Processor specific services
*
*
* @author nm
*/
public class ServiceWithConfig {
final YamcsService service;
final String serviceClass;
final String name;
final YConfiguration args;
final boolean enableAtStartup;
public ServiceWithConfig(YamcsService service, String serviceClass, String name, YConfiguration args, boolean enabledAtStartup) {
this.service = service;
this.serviceClass = serviceClass;
this.name = name;
this.args = args;
this.enableAtStartup = enabledAtStartup;
}
public ServiceWithConfig(YamcsService service, String serviceClass, String name, YConfiguration args) {
this(service, serviceClass, name, args, true);
}
public YamcsService getService() {
return service;
}
public String getServiceClass() {
return serviceClass;
}
public String getName() {
return name;
}
public Object getArgs() {
return args;
}
@Override
public String toString() {
return "ServiceWithConfig [service=" + service + ", serviceClass=" + serviceClass + ", name=" + name + ", args="
+ args + "]";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy