Package org.yamcs.management
Class ManagementService
- java.lang.Object
-
- org.yamcs.management.ManagementService
-
- All Implemented Interfaces:
ProcessorListener
public class ManagementService extends Object implements ProcessorListener
Responsible for providing to interested listeners info related to creation/removal/update of:- instances, processors and clients - see
ManagementListener - streams and tables - see
TableStreamListener - command queues - see
CommandQueueListener
-
-
Method Summary
-
-
-
Method Detail
-
getInstance
public static ManagementService getInstance()
-
shutdown
public void shutdown()
-
registerService
public void registerService(String instance, String serviceName, com.google.common.util.concurrent.Service service)
-
getQueueManager
public CommandQueueManager getQueueManager(String instance, String processorName) throws YamcsException
- Throws:
YamcsException
-
getQueueManagers
public List<CommandQueueManager> getQueueManagers()
-
registerClient
public void registerClient(ConnectedClient client)
-
unregisterClient
public void unregisterClient(int id)
-
createProcessor
public void createProcessor(org.yamcs.protobuf.ProcessorManagementRequest pmr, String username) throws YamcsException- Throws:
YamcsException
-
connectToProcessor
public void connectToProcessor(Processor processor, int clientId) throws YamcsException, ProcessorException
- Throws:
YamcsExceptionProcessorException
-
connectToProcessor
public void connectToProcessor(org.yamcs.protobuf.ProcessorManagementRequest cr) throws YamcsException- Throws:
YamcsException
-
registerCommandQueueManager
public void registerCommandQueueManager(String instance, String processorName, CommandQueueManager cqm)
-
unregisterCommandQueueManager
public void unregisterCommandQueueManager(String instance, String processorName, CommandQueueManager cqm)
-
getCommandQueueManagers
public List<CommandQueueManager> getCommandQueueManagers()
-
getCommandQueueManager
public CommandQueueManager getCommandQueueManager(Processor processor)
-
addManagementListener
public boolean addManagementListener(ManagementListener l)
Adds a listener that is to be notified when any processor, or any client is updated. Calling this multiple times has no extra effects. Either you listen, or you don't.
-
removeManagementListener
public boolean removeManagementListener(ManagementListener l)
-
addCommandQueueListener
public boolean addCommandQueueListener(CommandQueueListener l)
-
addTableStreamListener
public boolean addTableStreamListener(TableStreamListener l)
-
removeTableStreamListener
public boolean removeTableStreamListener(TableStreamListener l)
-
removeCommandQueueListener
public boolean removeCommandQueueListener(CommandQueueListener l)
-
getClients
public Set<ConnectedClient> getClients()
-
getClients
public Set<ConnectedClient> getClients(String username)
-
getClient
public ConnectedClient getClient(int clientId)
-
processorAdded
public void processorAdded(Processor processor)
- Specified by:
processorAddedin interfaceProcessorListener
-
processorClosed
public void processorClosed(Processor processor)
- Specified by:
processorClosedin interfaceProcessorListener
-
processorStateChanged
public void processorStateChanged(Processor processor)
- Specified by:
processorStateChangedin interfaceProcessorListener
-
registerYamcsInstance
public void registerYamcsInstance(YamcsServerInstance ys)
-
registerTable
public void registerTable(String instance, TableDefinition tblDef)
-
-