Class PathManagerService
- java.lang.Object
-
- org.jboss.as.controller.services.path.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 thePathManager
as an MSCService
.- Author:
- Kabir Khan
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.services.path.PathManager
PathManager.Callback, PathManager.Event, PathManager.PathEventContext, PathManager.ReloadServerCallback
-
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.msc.service.ServiceName
SERVICE_NAME
Deprecated.ServiceName should be obtained from capability-
Fields inherited from interface org.jboss.as.controller.services.path.PathManager
PATH_SERVICE_DESCRIPTOR, SERVICE_DESCRIPTOR
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PathManagerService()
protected
PathManagerService(RuntimeCapabilityRegistry capabilityRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jboss.msc.service.ServiceController<?>
addHardcodedAbsolutePath(org.jboss.msc.service.ServiceTarget serviceTarget, String pathName, String path)
Add aPathEntry
and install aService<String>
for one of the standard read-only paths that are determined from this process' environment.void
addPathManagerResources(Resource resource)
Add child resources to the given resource, one for eachPathEntry
currently associated with this path manager.PathEntry
getPathEntry(String pathName)
Gets a path entryPathManagerService
getValue()
PathManager.Callback.Handle
registerCallback(String name, PathManager.Callback callback, PathManager.Event... events)
Registers a callback for when a path is added/changed/removedString
resolveRelativePathEntry(String path, String relativeTo)
Resolves a relative pathvoid
start(org.jboss.msc.service.StartContext context)
void
stop(org.jboss.msc.service.StopContext context)
-
-
-
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()
-
PathManagerService
protected PathManagerService(RuntimeCapabilityRegistry capabilityRegistry)
-
-
Method Detail
-
addPathManagerResources
public final void addPathManagerResources(Resource resource)
Add child resources to the given resource, one for eachPathEntry
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 interfacePathManager
- Parameters:
path
- an absolute path ifrelativeTo
isnull
, the relative path torelativeTo
otherwiserelativeTo
- the name of the path this is relative to, may benull
- Returns:
- the resolved path
-
registerCallback
public final PathManager.Callback.Handle registerCallback(String name, PathManager.Callback callback, PathManager.Event... events)
Description copied from interface:PathManager
Registers a callback for when a path is added/changed/removed- Specified by:
registerCallback
in interfacePathManager
- Parameters:
name
- the name of the pathcallback
- the callback instance that will be called when one of the events occurevents
- the events we are interested in- Returns:
- a handle to unregister the callback
-
start
public final void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
- Specified by:
start
in interfaceorg.jboss.msc.Service
- Throws:
org.jboss.msc.service.StartException
-
stop
public final void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
-
getValue
public final PathManagerService getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValue
in interfaceorg.jboss.msc.value.Value<PathManager>
- Throws:
IllegalStateException
IllegalArgumentException
-
addHardcodedAbsolutePath
protected final org.jboss.msc.service.ServiceController<?> addHardcodedAbsolutePath(org.jboss.msc.service.ServiceTarget serviceTarget, String pathName, String path)
Add aPathEntry
and install aService<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 installationpathName
- the logical name of the path within the model. Cannot benull
path
- the value of the path within the model. This is an absolute path. Cannot benull
- 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 interfacePathManager
- Parameters:
pathName
- the name of the path- Returns:
- the path
-
-