Class PathManagerService

java.lang.Object
org.jboss.as.controller.services.path.PathManagerService
All Implemented Interfaces:
PathManager, org.jboss.msc.Service, org.jboss.msc.service.Service<PathManager>, org.jboss.msc.value.Value<PathManager>

public abstract class PathManagerService extends Object implements PathManager, org.jboss.msc.service.Service<PathManager>
PathManager implementation that exposes additional methods used by the management operation handlers used for paths, and also exposes the the PathManager as an MSC Service.
Author:
Kabir Khan
  • Field Details

    • SERVICE_NAME

      @Deprecated(forRemoval=true) public static final org.jboss.msc.service.ServiceName SERVICE_NAME
      Deprecated, for removal: This API element is subject to removal in a future version.
      ServiceName should be obtained from capability 'org.wildfly.management.path-manager'.
  • Constructor Details

    • PathManagerService

      protected PathManagerService()
    • PathManagerService

      protected PathManagerService(RuntimeCapabilityRegistry capabilityRegistry)
  • Method Details

    • addPathManagerResources

      public final void addPathManagerResources(Resource resource)
      Add child resources to the given resource, one for each PathEntry currently associated with this path manager. Used to initialize the model with resources for the standard paths that are not part of the persistent configuration.
      Parameters:
      resource - the resource to which children should be added.
    • resolveRelativePathEntry

      public final String resolveRelativePathEntry(String path, String relativeTo)
      Description copied from interface: PathManager
      Resolves a relative path
      Specified by:
      resolveRelativePathEntry in interface PathManager
      Parameters:
      path - an absolute path if relativeTo is null, the relative path to relativeTo otherwise
      relativeTo - the name of the path this is relative to, may be null
      Returns:
      the resolved path
    • registerCallback

      public final PathManager.Callback.Handle registerCallback(String name, PathManager.Callback callback, PathManager.Event... events)
      Description copied from interface: PathManager
      Registers a callback for when a path is added/changed/removed
      Specified by:
      registerCallback in interface PathManager
      Parameters:
      name - the name of the path
      callback - the callback instance that will be called when one of the events occur
      events - the events we are interested in
      Returns:
      a handle to unregister the callback
    • start

      public final void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
      Specified by:
      start in interface org.jboss.msc.Service
      Throws:
      org.jboss.msc.service.StartException
    • stop

      public final void stop(org.jboss.msc.service.StopContext context)
      Specified by:
      stop in interface org.jboss.msc.Service
    • getValue

      Specified by:
      getValue in interface org.jboss.msc.value.Value<PathManager>
      Throws:
      IllegalStateException
      IllegalArgumentException
    • addHardcodedAbsolutePath

      protected final org.jboss.msc.service.ServiceController<?> addHardcodedAbsolutePath(org.jboss.msc.service.ServiceTarget serviceTarget, String pathName, String path)
      Add a PathEntry and install a Service<String> for one of the standard read-only paths that are determined from this process' environment. Not to be used for paths stored in the persistent configuration.
      Parameters:
      serviceTarget - service target to use for the service installation
      pathName - the logical name of the path within the model. Cannot be null
      path - the value of the path within the model. This is an absolute path. Cannot be null
      Returns:
      the controller for the installed Service<String>
    • getPathEntry

      public final PathEntry getPathEntry(String pathName)
      Description copied from interface: PathManager
      Gets a path entry
      Specified by:
      getPathEntry in interface PathManager
      Parameters:
      pathName - the name of the path
      Returns:
      the path