public class EclipseLazyStarter extends Object implements ClassLoadingStatsHook, AdaptorHook, HookConfigurator
| Constructor and Description |
|---|
EclipseLazyStarter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHooks(HookRegistry hookRegistry)
Adds hooks to the specified hook registry.
|
void |
addProperties(Properties properties)
Gets called by the adaptor during
FrameworkAdaptor.getProperties(). |
FrameworkLog |
createFrameworkLog()
Gets called by the adaptor during
FrameworkAdaptor.getFrameworkLog(). |
void |
frameworkStart(BundleContext context)
Gets called by the adaptor during
FrameworkAdaptor.frameworkStart(BundleContext). |
void |
frameworkStop(BundleContext context)
Gets called by the adaptor during
FrameworkAdaptor.frameworkStop(BundleContext). |
void |
frameworkStopping(BundleContext context)
Gets called by the adaptor during
FrameworkAdaptor.frameworkStopping(BundleContext). |
void |
handleRuntimeError(Throwable error)
Gets called by the adaptor during
FrameworkAdaptor.handleRuntimeError(Throwable). |
void |
initialize(BaseAdaptor baseAdaptor)
Gets called by the adaptor during
FrameworkAdaptor.initialize(EventPublisher). |
URLConnection |
mapLocationToURLConnection(String location)
Gets called by the adaptor during
FrameworkAdaptor.mapLocationToURLConnection(String). |
void |
postFindLocalClass(String name,
Class<?> clazz,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalClass(String) after
searching the local classloader for a class. |
void |
postFindLocalResource(String name,
URL resource,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalResource(String) after
searching the local classloader for a resource. |
void |
preFindLocalClass(String name,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalClass(String) before
searching the local classloader for a class. |
void |
preFindLocalResource(String name,
ClasspathManager manager)
Gets called by a classpath manager during
ClasspathManager.findLocalResource(String) before
searching the local classloader for a resource. |
void |
recordClassDefine(String name,
Class<?> clazz,
byte[] classbytes,
ClasspathEntry classpathEntry,
BundleEntry entry,
ClasspathManager manager)
Gets called by a classpath manager after an attempt is made to define a class.
|
public void preFindLocalClass(String name, ClasspathManager manager) throws ClassNotFoundException
ClassLoadingStatsHookClasspathManager.findLocalClass(String) before
searching the local classloader for a class. A classpath manager will call this method for
each configured class loading stat hook.preFindLocalClass in interface ClassLoadingStatsHookname - the name of the requested classmanager - the classpath manager used to find and load the requested classClassNotFoundException - to prevent the requested class from loadingpublic void postFindLocalClass(String name, Class<?> clazz, ClasspathManager manager) throws ClassNotFoundException
ClassLoadingStatsHookClasspathManager.findLocalClass(String) after
searching the local classloader for a class. A classpath manager will call this method for
each configured class loading stat hook.postFindLocalClass in interface ClassLoadingStatsHookname - the name of the requested classclazz - the loaded class or null if not foundmanager - the classpath manager used to find and load the requested classClassNotFoundExceptionpublic void preFindLocalResource(String name, ClasspathManager manager)
ClassLoadingStatsHookClasspathManager.findLocalResource(String) before
searching the local classloader for a resource. A classpath manager will call this method for
each configured class loading stat hook.preFindLocalResource in interface ClassLoadingStatsHookname - the name of the requested resourcemanager - the classpath manager used to find the requested resourcepublic void postFindLocalResource(String name, URL resource, ClasspathManager manager)
ClassLoadingStatsHookClasspathManager.findLocalResource(String) after
searching the local classloader for a resource. A classpath manager will call this method for
each configured class loading stat hook.postFindLocalResource in interface ClassLoadingStatsHookname - the name of the requested resourceresource - the URL to the requested resource or null if not foundmanager - the classpath manager used to find the requested resourcepublic void recordClassDefine(String name, Class<?> clazz, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager)
ClassLoadingStatsHookrecordClassDefine in interface ClassLoadingStatsHookname - the name of the class that got definedclazz - the class object that got defined or null if an error occurred while defining a classclassbytes - the class bytes used to define the classclasspathEntry - the ClasspathEntry where the class bytes got read fromentry - the BundleEntyr source of the class bytesmanager - the classpath manager used to define the classpublic void addHooks(HookRegistry hookRegistry)
HookConfiguratoraddHooks in interface HookConfiguratorhookRegistry - the hook registry used to add hookspublic void addProperties(Properties properties)
AdaptorHookFrameworkAdaptor.getProperties().
This method allows an adaptor hook to add property values to the adaptor
properties object.addProperties in interface AdaptorHookproperties - the adaptor properties object.public FrameworkLog createFrameworkLog()
AdaptorHookFrameworkAdaptor.getFrameworkLog().
The adaptor will call this method for each configured adaptor hook until one
adaptor hook returns a non-null value. If no adaptor hook returns a non-null value
then the adaptor will return null.createFrameworkLog in interface AdaptorHookpublic void frameworkStart(BundleContext context) throws BundleException
AdaptorHookFrameworkAdaptor.frameworkStart(BundleContext).
This method allows an adaptor hook to execute code when the framework is starting
(e.g. to register services).frameworkStart in interface AdaptorHookcontext - the system bundle contextBundleExceptionpublic void frameworkStop(BundleContext context) throws BundleException
AdaptorHookFrameworkAdaptor.frameworkStop(BundleContext).
This method allows an adaptor hook to execute code when the framework is stopped
(e.g. to unregister services).frameworkStop in interface AdaptorHookcontext - the system bundle contextBundleExceptionpublic void frameworkStopping(BundleContext context)
AdaptorHookFrameworkAdaptor.frameworkStopping(BundleContext).
This method allows an adaptor hook to execute code when the framework is about to start
the shutdown process.frameworkStopping in interface AdaptorHookcontext - the system bundle contextpublic void handleRuntimeError(Throwable error)
AdaptorHookFrameworkAdaptor.handleRuntimeError(Throwable).
The adaptor will call this method for each configured adaptor hook.handleRuntimeError in interface AdaptorHookerror - the unexpected error that occured.public void initialize(BaseAdaptor baseAdaptor)
AdaptorHookFrameworkAdaptor.initialize(EventPublisher).
This method allows an adaptor hook to save the adaptor object for later.initialize in interface AdaptorHookbaseAdaptor - the adaptor object associated with this AdaptorHook.public URLConnection mapLocationToURLConnection(String location) throws IOException
AdaptorHookFrameworkAdaptor.mapLocationToURLConnection(String).
The adaptor will call this method for each configured adaptor hook until one
adaptor hook returns a non-null value. If no adaptor hook returns a non-null value
then the adaptor will perform the default behavior.mapLocationToURLConnection in interface AdaptorHooklocation - a bundle location string to be converted to a URLConnectionIOExceptionCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.