public interface LibrariesManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLoadNewLibraries()
Return true if this libraries manager has the capability to dynamically load libraries after startup.
|
List<File> |
getLibrariesLocations()
Return the list of libraries loaded.
|
default Library |
getLibrary(Class<?> clazz)
Return the loaded library for the given class, or null if no specific library matches this class.
|
Library |
getLibrary(ClassLoader cl)
Return the loaded library for the given class loader, or null if no specific library matches this class loader.
|
Library |
getLibrary(String groupId,
String artifactId)
Return a loaded library, or null if not loaded.
|
default IO.Readable |
getResource(String path,
byte priority)
Open a resource or return null if it does not exist.
|
IO.Readable |
getResource(String groupId,
String artifactId,
String path,
byte priority)
Open a resource from a specific library if possible, or return null if it does not exist.
|
default IO.Readable |
getResourceFrom(Class<?> clazz,
String path,
byte priority)
Open a resource from a specific library if possible, or return null if it does not exist.
|
IO.Readable |
getResourceFrom(ClassLoader cl,
String path,
byte priority)
Open a resource from a specific library if possible, or return null if it does not exist.
|
AsyncWork<Library,Exception> |
loadNewLibrary(String groupId,
String artifactId,
VersionSpecification version,
boolean optional,
byte priority,
WorkProgress progress,
long work)
Load a new library.
|
ISynchronizationPoint<Exception> |
onLibrariesLoaded()
Return a synchronization point which is blocked until this libraries manager has been initialized and has loaded any required library.
|
ApplicationClassLoader |
start(Application app)
This method is automatically called on application startup so this libraries manager
can initialize and load libraries as needed for the given application.
|
ApplicationClassLoader start(Application app)
ISynchronizationPoint<Exception> onLibrariesLoaded()
boolean canLoadNewLibraries()
AsyncWork<Library,Exception> loadNewLibrary(String groupId, String artifactId, VersionSpecification version, boolean optional, byte priority, WorkProgress progress, long work)
Library getLibrary(String groupId, String artifactId)
Library getLibrary(ClassLoader cl)
default Library getLibrary(Class<?> clazz)
IO.Readable getResource(String groupId, String artifactId, String path, byte priority)
default IO.Readable getResource(String path, byte priority)
IO.Readable getResourceFrom(ClassLoader cl, String path, byte priority)
default IO.Readable getResourceFrom(Class<?> clazz, String path, byte priority)
Copyright © 2018. All rights reserved.