Interface PathManager
- All Known Implementing Classes:
PathManagerService
public interface PathManager
The client interface for the
PathManagerService- Author:
- Kabir Khan
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA callback, seeregisterCallback(String, Callback, Event...)static enumAn event triggered when changes are made to a path entrystatic interfacestatic classFactory for aPathManager.Callbackthat always callsPathManager.PathEventContext.reloadRequired()from itsPathManager.Callback.pathModelEvent(PathEventContext, String)method. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UnaryServiceDescriptor<String>static final NullaryServiceDescriptor<PathManager> -
Method Summary
Modifier and TypeMethodDescriptiongetPathEntry(String name) Gets a path entryregisterCallback(String name, PathManager.Callback callback, PathManager.Event... events) Registers a callback for when a path is added/changed/removedresolveRelativePathEntry(String path, String relativeTo) Resolves a relative path
-
Field Details
-
SERVICE_DESCRIPTOR
-
PATH_SERVICE_DESCRIPTOR
-
-
Method Details
-
resolveRelativePathEntry
Resolves a relative path- 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
- Throws:
IllegalStateException- if there is no path registered underrelativeTo
-
getPathEntry
Gets a path entry- Parameters:
name- the name of the path- Returns:
- the path
- Throws:
IllegalStateException- if there is no path registered underpath
-
registerCallback
PathManager.Callback.Handle registerCallback(String name, PathManager.Callback callback, PathManager.Event... events) Registers a callback for when a path is added/changed/removed- 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
-