Class AbstractPathService

java.lang.Object
org.jboss.as.controller.services.path.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
  • Field Summary

    Fields inherited from interface org.jboss.msc.service.Service

    NULL
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static boolean
    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.
    static org.jboss.msc.service.ServiceName
    pathNameOf(String pathName)
     
    protected abstract String
     
    void
    start(org.jboss.msc.service.StartContext context)
     
    void
    stop(org.jboss.msc.service.StopContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

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

      public String getValue() throws IllegalStateException
      Specified by:
      getValue in interface org.jboss.msc.value.Value<String>
      Throws:
      IllegalStateException
    • resolvePath

      protected abstract String resolvePath()