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>
PathManagerimplementation that exposes additional methods used by the management operation handlers used for paths, and also exposes the thePathManageras 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.ServiceNameSERVICE_NAMEDeprecated.ServiceName should be obtained from capability
-
Constructor Summary
Constructors Modifier Constructor Description protectedPathManagerService()protectedPathManagerService(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 aPathEntryand install aService<String>for one of the standard read-only paths that are determined from this process' environment.voidaddPathManagerResources(Resource resource)Add child resources to the given resource, one for eachPathEntrycurrently associated with this path manager.PathEntrygetPathEntry(String pathName)Gets a path entryPathManagerServicegetValue()PathManager.Callback.HandleregisterCallback(String name, PathManager.Callback callback, PathManager.Event... events)Registers a callback for when a path is added/changed/removedStringresolveRelativePathEntry(String path, String relativeTo)Resolves a relative pathvoidstart(org.jboss.msc.service.StartContext context)voidstop(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 eachPathEntrycurrently 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:PathManagerResolves a relative path- Specified by:
resolveRelativePathEntryin interfacePathManager- Parameters:
path- an absolute path ifrelativeToisnull, the relative path torelativeTootherwiserelativeTo- 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:PathManagerRegisters a callback for when a path is added/changed/removed- Specified by:
registerCallbackin 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:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<PathManager>- Throws:
org.jboss.msc.service.StartException
-
stop
public final void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<PathManager>
-
getValue
public final PathManagerService getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<PathManager>- Throws:
IllegalStateExceptionIllegalArgumentException
-
addHardcodedAbsolutePath
protected final org.jboss.msc.service.ServiceController<?> addHardcodedAbsolutePath(org.jboss.msc.service.ServiceTarget serviceTarget, String pathName, String path)Add aPathEntryand 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 benullpath- 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:PathManagerGets a path entry- Specified by:
getPathEntryin interfacePathManager- Parameters:
pathName- the name of the path- Returns:
- the path
-
-