Package org.nuxeo.osgi
Class OSGiBundleContext
- java.lang.Object
-
- org.nuxeo.osgi.OSGiBundleContext
-
- All Implemented Interfaces:
org.osgi.framework.BundleContext
public class OSGiBundleContext extends Object implements org.osgi.framework.BundleContext
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description OSGiBundleContext(BundleImpl bundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBundleListener(org.osgi.framework.BundleListener listener)voidaddFrameworkListener(org.osgi.framework.FrameworkListener listener)voidaddServiceListener(org.osgi.framework.ServiceListener listener)voidaddServiceListener(org.osgi.framework.ServiceListener listener, String filter)org.osgi.framework.FiltercreateFilter(String filter)org.osgi.framework.ServiceReference[]getAllServiceReferences(String clazz, String filter)org.osgi.framework.BundlegetBundle()org.osgi.framework.BundlegetBundle(long id)org.osgi.framework.Bundle[]getBundles()FilegetDataFile(String filename)OSGiAdaptergetOSGiAdapter()StringgetProperty(String key)ObjectgetService(org.osgi.framework.ServiceReference reference)org.osgi.framework.ServiceReferencegetServiceReference(String clazz)org.osgi.framework.ServiceReference[]getServiceReferences(String clazz, String filter)org.osgi.framework.BundleinstallBundle(String location)org.osgi.framework.BundleinstallBundle(String location, InputStream input)org.osgi.framework.ServiceRegistrationregisterService(String[] clazzes, Object service, Dictionary properties)org.osgi.framework.ServiceRegistrationregisterService(String clazz, Object service, Dictionary properties)voidremoveBundleListener(org.osgi.framework.BundleListener listener)voidremoveFrameworkListener(org.osgi.framework.FrameworkListener listener)voidremoveServiceListener(org.osgi.framework.ServiceListener listener)booleanungetService(org.osgi.framework.ServiceReference reference)
-
-
-
Constructor Detail
-
OSGiBundleContext
public OSGiBundleContext(BundleImpl bundle)
-
-
Method Detail
-
getOSGiAdapter
public OSGiAdapter getOSGiAdapter()
-
addBundleListener
public void addBundleListener(org.osgi.framework.BundleListener listener)
- Specified by:
addBundleListenerin interfaceorg.osgi.framework.BundleContext
-
addFrameworkListener
public void addFrameworkListener(org.osgi.framework.FrameworkListener listener)
- Specified by:
addFrameworkListenerin interfaceorg.osgi.framework.BundleContext
-
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener listener)
- Specified by:
addServiceListenerin interfaceorg.osgi.framework.BundleContext
-
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener listener, String filter) throws org.osgi.framework.InvalidSyntaxException- Specified by:
addServiceListenerin interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.InvalidSyntaxException
-
createFilter
public org.osgi.framework.Filter createFilter(String filter) throws org.osgi.framework.InvalidSyntaxException
- Specified by:
createFilterin interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.InvalidSyntaxException
-
getAllServiceReferences
public org.osgi.framework.ServiceReference[] getAllServiceReferences(String clazz, String filter) throws org.osgi.framework.InvalidSyntaxException
- Specified by:
getAllServiceReferencesin interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.InvalidSyntaxException
-
getBundle
public org.osgi.framework.Bundle getBundle()
- Specified by:
getBundlein interfaceorg.osgi.framework.BundleContext
-
getBundle
public org.osgi.framework.Bundle getBundle(long id)
- Specified by:
getBundlein interfaceorg.osgi.framework.BundleContext
-
getBundles
public org.osgi.framework.Bundle[] getBundles()
- Specified by:
getBundlesin interfaceorg.osgi.framework.BundleContext
-
getDataFile
public File getDataFile(String filename)
- Specified by:
getDataFilein interfaceorg.osgi.framework.BundleContext
-
getProperty
public String getProperty(String key)
- Specified by:
getPropertyin interfaceorg.osgi.framework.BundleContext
-
getService
public Object getService(org.osgi.framework.ServiceReference reference)
- Specified by:
getServicein interfaceorg.osgi.framework.BundleContext
-
getServiceReference
public org.osgi.framework.ServiceReference getServiceReference(String clazz)
- Specified by:
getServiceReferencein interfaceorg.osgi.framework.BundleContext
-
getServiceReferences
public org.osgi.framework.ServiceReference[] getServiceReferences(String clazz, String filter) throws org.osgi.framework.InvalidSyntaxException
- Specified by:
getServiceReferencesin interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.InvalidSyntaxException
-
installBundle
public org.osgi.framework.Bundle installBundle(String location) throws org.osgi.framework.BundleException
- Specified by:
installBundlein interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.BundleException
-
installBundle
public org.osgi.framework.Bundle installBundle(String location, InputStream input) throws org.osgi.framework.BundleException
- Specified by:
installBundlein interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.BundleException
-
registerService
public org.osgi.framework.ServiceRegistration registerService(String[] clazzes, Object service, Dictionary properties)
- Specified by:
registerServicein interfaceorg.osgi.framework.BundleContext
-
registerService
public org.osgi.framework.ServiceRegistration registerService(String clazz, Object service, Dictionary properties)
- Specified by:
registerServicein interfaceorg.osgi.framework.BundleContext
-
removeBundleListener
public void removeBundleListener(org.osgi.framework.BundleListener listener)
- Specified by:
removeBundleListenerin interfaceorg.osgi.framework.BundleContext
-
removeFrameworkListener
public void removeFrameworkListener(org.osgi.framework.FrameworkListener listener)
- Specified by:
removeFrameworkListenerin interfaceorg.osgi.framework.BundleContext
-
removeServiceListener
public void removeServiceListener(org.osgi.framework.ServiceListener listener)
- Specified by:
removeServiceListenerin interfaceorg.osgi.framework.BundleContext
-
ungetService
public boolean ungetService(org.osgi.framework.ServiceReference reference)
- Specified by:
ungetServicein interfaceorg.osgi.framework.BundleContext
-
-