Class LocalizationService

All Implemented Interfaces:
CtxEventListener, ContextHandleAware, HandleAware, Ready, ReadyListener

public final class LocalizationService extends AbstractService
Centralized localization service that provides discoverability of registered LocalizationContext objects. This is designed to work with the ui sdk.
Version:
2024-04-08
  • 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 call setReady() later due to some async processing, return false to prevent setReady() from being called automatically.

      It is recommended to override this method rather than onDependenciesReady() as a majority of the time it requires calling super.onDependneciesReady() or explicitly calling setReady() which defaults to a failure mode.

      Overrides:
      onBeanReady in class ReadyBean
      Returns:
    • mount

      public void mount(String path, LocalizationContext ctx)
      Register a LocalizationContext with 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 VFS
      ctx - the context to mount
    • unmount

      public void unmount(LocalizationContext ctx)
      Unregister a LocalizationContext from the service. This will unmount the context and allow it to be garbage collected.
      Parameters:
      ctx - the context to unmount
    • unmount

      public void unmount(String path)
      Unregister a LocalizationContext with the specified mount path.
      Parameters:
      path - the path used to mount the context