Class LocalizationService
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.core.service.localization.LocalizationService
- All Implemented Interfaces:
CtxEventListener,ContextHandleAware,HandleAware,Ready,ReadyAndReadyListener,ReadyListener
Centralized localization service that provides discoverability of
registered
LocalizationContext objects. This is designed to
work with the ui sdk.- Version:
- 2024-04-08
-
Method Summary
Modifier and TypeMethodDescriptionvoidmount(String path, LocalizationContext ctx) Register aLocalizationContextwith the service.booleanOverride in subclasses to be notified when all dependencies are ready.voidUnregister aLocalizationContextfrom the service.voidUnregister aLocalizationContextwith the specified mount path.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefixMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompletedMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPathMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyAndReadyListener
onDependenciesReadyMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Method Details
-
onBeanReady
public boolean onBeanReady()Description copied from interface:ReadyAndReadyListenerOverride 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.- Returns:
- true if this object is now ready
-
mount
Register aLocalizationContextwith the service. This will make the context available in the VFS and discoverable via associated endpoints. Contexts must be unmounted in order for them to be removed from the VFS and garbage collected.- Parameters:
path- a unique path used to mount the context within the VFSctx- the context to mount
-
unmount
Unregister aLocalizationContextfrom the service. This will unmount the context and allow it to be garbage collected.- Parameters:
ctx- the context to unmount
-
unmount
Unregister aLocalizationContextwith the specified mount path.- Parameters:
path- the path used to mount the context
-