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
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetValue()static booleanisAbsoluteUnixOrWindowsPath(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.static org.jboss.msc.service.ServiceNamepathNameOf(String pathName)protected abstract StringresolvePath()voidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
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
Fileand callingFile.isAbsolute()in that its results do not change depending on what the filesystem underlying the Java Virtual Machine is.- Parameters:
path- the path- Returns:
trueifpathlooks like an absolute Unix or Windows pathname
-
start
public void start(org.jboss.msc.service.StartContext context)
- Specified by:
startin interfaceorg.jboss.msc.Service
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service
-
getValue
public String getValue() throws IllegalStateException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<String>- Throws:
IllegalStateException
-
resolvePath
protected abstract String resolvePath()
-
-