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 String
getValue()
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.static org.jboss.msc.service.ServiceName
pathNameOf(String pathName)
protected abstract String
resolvePath()
void
start(org.jboss.msc.service.StartContext context)
void
stop(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
File
and 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:
true
ifpath
looks like an absolute Unix or Windows pathname
-
start
public void start(org.jboss.msc.service.StartContext context)
- Specified by:
start
in interfaceorg.jboss.msc.Service
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
-
getValue
public String getValue() throws IllegalStateException
- Specified by:
getValue
in interfaceorg.jboss.msc.value.Value<String>
- Throws:
IllegalStateException
-
resolvePath
protected abstract String resolvePath()
-
-