public class LibraryService extends BasicService implements ILibraryService, IPropertiesProvider
LIBRARY_SERVICEEMPTY_SERVICES| Constructor and Description |
|---|
LibraryService(IServiceProvider provider)
Creates a new LibraryService.
|
LibraryService(Object[] urls,
IServiceProvider provider)
Creates a new LibraryService.
|
LibraryService(Object[] urls,
IServiceProvider provider,
Map properties)
Creates a new LibraryService.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLibraryServiceListener(ILibraryServiceListener listener)
Add an Library Service listener.
|
void |
addPath(String path)
Add a path.
|
void |
addURL(URL url)
Add a new url.
|
IFuture<List<URL>> |
getAllURLs()
Get all urls (managed and non-managed).
|
IFuture<byte[]> |
getClassDefinition(String name)
Get a class definition.
|
ClassLoader |
getClassLoader()
Returns the current ClassLoader
|
IFuture<List<URL>> |
getNonManagedURLs()
Get other contained (but not directly managed) URLs.
|
IFuture<List<String>> |
getNonManagedURLStrings()
Get the non-managed classpath entries.
|
IFuture<Properties> |
getProperties()
Write current state into properties.
|
IFuture<List<URL>> |
getURLs()
Get all managed entries as URLs.
|
IFuture<List<String>> |
getURLStrings()
Get the non-managed classpath entries as strings.
|
static int |
indexOfFilename(String url,
List urlstrings)
Test if a file name is contained.
|
void |
removeLibraryServiceListener(ILibraryServiceListener listener)
Remove an Library Service listener.
|
void |
removeURL(URL url)
Remove a url.
|
void |
removeURLCompletely(URL url)
Remove a url completely (all references).
|
IFuture<Void> |
setProperties(Properties props)
Update from given properties.
|
IFuture<Void> |
shutdownService()
Shutdown the service.
|
IFuture<Void> |
startService()
Start the service.
|
static URL |
toURL(Object url)
Convert a file/string/url.
|
static File |
urlToFile(String url)
Convert an URL to a file.
|
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getPropertyMap, getServiceIdentifier, isValid, setPropertyMapgetClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropertyMap, getServiceIdentifier, isValidpublic LibraryService(IServiceProvider provider)
public LibraryService(Object[] urls, IServiceProvider provider)
urls - Urls may be specified as java.net.URLs, java.io.Files or java.lang.Strings.
Strings are interpreted as relative files (relative to current directory),
absolute files or URLs (whatever can be found).public LibraryService(Object[] urls, IServiceProvider provider, Map properties)
urls - Urls may be specified as java.net.URLs, java.io.Files or java.lang.Strings.
Strings are interpreted as relative files (relative to current directory),
absolute files or URLs (whatever can be found).public void addPath(String path)
path - The path.public void addURL(URL url)
addURL in interface ILibraryServiceurl - The url.public void removeURL(URL url)
removeURL in interface ILibraryServiceurl - The url.public void removeURLCompletely(URL url)
removeURLCompletely in interface ILibraryServiceurl - The url.public IFuture<List<URL>> getURLs()
getURLs in interface ILibraryServicepublic IFuture<List<URL>> getNonManagedURLs()
getNonManagedURLs in interface ILibraryServicepublic IFuture<List<URL>> getAllURLs()
getAllURLs in interface ILibraryServicepublic ClassLoader getClassLoader()
getClassLoader in interface ILibraryServicepublic IFuture<Void> startService()
startService in interface IInternalServicestartService in class BasicServicepublic IFuture<Void> shutdownService()
shutdownService in interface IInternalServiceshutdownService in class BasicServicelistener - The listener.public void addLibraryServiceListener(ILibraryServiceListener listener)
addLibraryServiceListener in interface ILibraryServicelistener - The listener to be added.public void removeLibraryServiceListener(ILibraryServiceListener listener)
removeLibraryServiceListener in interface ILibraryServicelistener - The listener to be removed.public IFuture<List<String>> getURLStrings()
getURLStrings in interface ILibraryServicepublic IFuture<List<String>> getNonManagedURLStrings()
getNonManagedURLStrings in interface ILibraryServicepublic IFuture<byte[]> getClassDefinition(String name)
getClassDefinition in interface ILibraryServicename - The class name.public IFuture<Void> setProperties(Properties props)
setProperties in interface IPropertiesProviderpublic IFuture<Properties> getProperties()
getProperties in interface IPropertiesProviderpublic static int indexOfFilename(String url, List urlstrings)
Copyright © 2012. All Rights Reserved.