Class AbstractPathService

  • All Implemented Interfaces:
    org.jboss.msc.Service, org.jboss.msc.service.Service<String>, org.jboss.msc.value.Value<String>
    Direct Known Subclasses:
    AbsolutePathService, RelativePathService

    public abstract class AbstractPathService
    extends Object
    implements org.jboss.msc.service.Service<String>
    Abstract superclass for services that return a path.
    Author:
    Brian Stansberry, Richard Opalka
    • Method Detail

      • pathNameOf

        public static org.jboss.msc.service.ServiceName pathNameOf​(String pathName)
      • isAbsoluteUnixOrWindowsPath

        public static boolean isAbsoluteUnixOrWindowsPath​(String path)
        Checks whether the given path looks like an absolute Unix or Windows filesystem pathname without regard for what the filesystem is underlying the Java Virtual Machine. A UNIX pathname is absolute if its prefix is "/". A Microsoft Windows pathname is absolute if its prefix is a drive specifier followed by "\\", or if its prefix is "\\\\".

        This method differs from simply creating a new File and calling File.isAbsolute() in that its results do not change depending on what the filesystem underlying the Java Virtual Machine is.

        Parameters:
        path - the path
        Returns:
        true if path looks like an absolute Unix or Windows pathname
      • start

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

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

        protected abstract String resolvePath()