Class 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 Detail

      • SERVICE_NAME

        @Deprecated
        public static final org.jboss.msc.service.ServiceName SERVICE_NAME
        Deprecated.
        ServiceName should be obtained from capability
    • Constructor Detail

      • PathManagerService

        protected PathManagerService()
    • Method Detail

      • 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
      • 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
      • 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