Class ConfigServer
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.core.service.config.server.ConfigServer
- All Implemented Interfaces:
CtxEventListener
,ContextHandleAware
,HandleAware
,Ready
,ReadyListener
@ApiController(base="/server/config",
title="Config server",
desc="Endpoints for ConfigClient to hit.")
public class ConfigServer
extends AbstractService
Server that runs on the primary node which performs additional management
of the
ConfigService
for use on kOS and within multi-node environments.- Version:
- 2024-03-30
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn theDefaultConfigSource
for the global scope.getNodeDefaultSource
(NodeId nodeId) Return theDefaultConfigSource
for the specified nodeId.getNodeTypeDefaultSource
(NodeId nodeId) Return theDefaultConfigSource
for the node type of the specified node.boolean
Override in subclasses to be notified when all dependencies are ready.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefix
Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReady, onDependenciesReady
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted
Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Constructor Details
-
ConfigServer
public ConfigServer()
-
-
Method Details
-
onBeanReady
public boolean onBeanReady()Description copied from class:ReadyBean
Override in subclasses to be notified when all dependencies are ready. Return true to indicate that this bean is also ready. If the bean needs to callsetReady()
later due to some async processing, return false to preventsetReady()
from being called automatically.It is recommended to override this method rather than
onDependenciesReady()
as a majority of the time it requires callingsuper.onDependneciesReady()
or explicitly callingsetReady()
which defaults to a failure mode.- Overrides:
onBeanReady
in classReadyBean
- Returns:
-
getGlobalDefaultSource
Return theDefaultConfigSource
for the global scope. -
getNodeTypeDefaultSource
Return theDefaultConfigSource
for the node type of the specified node.- Parameters:
nodeId
- the node to get the nodeType from
-
getNodeDefaultSource
Return theDefaultConfigSource
for the specified nodeId.- Parameters:
nodeId
- the node to return the source for
-