org.apache.activemq.util.osgi
Class Activator
java.lang.Object
org.apache.activemq.util.osgi.Activator
- All Implemented Interfaces:
- java.util.EventListener, FactoryFinder.ObjectFactory, org.osgi.framework.BundleActivator, org.osgi.framework.BundleListener, org.osgi.framework.SynchronousBundleListener
public class Activator
- extends java.lang.Object
- implements org.osgi.framework.BundleActivator, org.osgi.framework.SynchronousBundleListener, FactoryFinder.ObjectFactory
An OSGi bundle activator for ActiveMQ which adapts the FactoryFinder
to the OSGi environment.
Method Summary |
void |
bundleChanged(org.osgi.framework.BundleEvent event)
|
java.lang.Object |
create(java.lang.String path)
|
protected void |
register(org.osgi.framework.Bundle bundle)
|
void |
start(org.osgi.framework.BundleContext bundleContext)
|
void |
stop(org.osgi.framework.BundleContext bundleContext)
|
protected void |
unregister(long bundleId)
When bundles unload.. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Activator
public Activator()
start
public void start(org.osgi.framework.BundleContext bundleContext)
throws java.lang.Exception
- Specified by:
start
in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
stop
public void stop(org.osgi.framework.BundleContext bundleContext)
throws java.lang.Exception
- Specified by:
stop
in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged
in interface org.osgi.framework.BundleListener
register
protected void register(org.osgi.framework.Bundle bundle)
unregister
protected void unregister(long bundleId)
- When bundles unload.. we remove them thier cached Class entries from the
serviceCache. Future service lookups for the service will fail.
TODO: consider a way to get the Broker release any references to
instances of the service.
- Parameters:
bundleId
-
create
public java.lang.Object create(java.lang.String path)
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
create
in interface FactoryFinder.ObjectFactory
- Parameters:
path
- the full service path
- Returns:
-
- Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
java.lang.ClassNotFoundException
Copyright © 2005-2016. All Rights Reserved.