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 the PathManager as an MSC Service.- 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
FieldsModifier and TypeFieldDescriptionstatic final org.jboss.msc.service.ServiceNameDeprecated, for removal: This API element is subject to removal in a future version.ServiceName should be obtained from capability 'org.wildfly.management.path-manager'.Fields inherited from interface org.jboss.as.controller.services.path.PathManager
PATH_SERVICE_DESCRIPTOR, SERVICE_DESCRIPTORFields inherited from interface org.jboss.msc.service.Service
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedPathManagerService(RuntimeCapabilityRegistry capabilityRegistry) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.final voidaddPathManagerResources(Resource resource) Add child resources to the given resource, one for eachPathEntrycurrently associated with this path manager.final PathEntrygetPathEntry(String pathName) Gets a path entryfinal PathManagerServicegetValue()registerCallback(String name, PathManager.Callback callback, PathManager.Event... events) Registers a callback for when a path is added/changed/removedfinal StringresolveRelativePathEntry(String path, String relativeTo) Resolves a relative pathfinal voidstart(org.jboss.msc.service.StartContext context) final voidstop(org.jboss.msc.service.StopContext context)
-
Field Details
-
SERVICE_NAME
Deprecated, for removal: This API element is subject to removal in a future version.ServiceName should be obtained from capability 'org.wildfly.management.path-manager'.
-
-
Constructor Details
-
PathManagerService
protected PathManagerService() -
PathManagerService
-
-
Method Details
-
addPathManagerResources
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
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- Throws:
org.jboss.msc.service.StartException
-
stop
public final void stop(org.jboss.msc.service.StopContext context) - Specified by:
stopin interfaceorg.jboss.msc.Service
-
getValue
- 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
Description copied from interface:PathManagerGets a path entry- Specified by:
getPathEntryin interfacePathManager- Parameters:
pathName- the name of the path- Returns:
- the path
-