Package org.apache.felix.dm.impl.index
Class BundleContextInterceptorBase
java.lang.Object
org.apache.felix.dm.impl.index.BundleContextInterceptorBase
- All Implemented Interfaces:
EventListener,org.osgi.framework.BundleContext,org.osgi.framework.BundleReference,org.osgi.framework.ServiceListener
- Direct Known Subclasses:
BundleContextInterceptor,FilterIndexBundleContext
public abstract class BundleContextInterceptorBase
extends Object
implements org.osgi.framework.BundleContext, org.osgi.framework.ServiceListener
Base class for bundle context interceptors that keep track of service listeners and delegate incoming changes to them.
- Author:
- Felix Project Team
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBundleListener(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.Bundleorg.osgi.framework.BundlegetBundle(long id) org.osgi.framework.Bundleorg.osgi.framework.Bundle[]getDataFile(String filename) getProperty(String key) getService(org.osgi.framework.ServiceReference reference) <S> org.osgi.framework.ServiceObjects<S> getServiceObjects(org.osgi.framework.ServiceReference<S> reference) <S> org.osgi.framework.ServiceReference<S> getServiceReference(Class<S> clazz) org.osgi.framework.ServiceReferencegetServiceReference(String clazz) <S> Collection<org.osgi.framework.ServiceReference<S>> getServiceReferences(Class<S> clazz, String filter) org.osgi.framework.ServiceReference[]getServiceReferences(String clazz, String filter) org.osgi.framework.BundleinstallBundle(String location) org.osgi.framework.BundleinstallBundle(String location, InputStream input) <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> clazz, org.osgi.framework.ServiceFactory<S> factory, Dictionary<String, ?> properties) <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> clazz, S service, Dictionary<String, ?> properties) 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) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.osgi.framework.ServiceListener
serviceChanged
-
Field Details
-
m_context
protected final org.osgi.framework.BundleContext m_context
-
-
Constructor Details
-
BundleContextInterceptorBase
public BundleContextInterceptorBase(org.osgi.framework.BundleContext context)
-
-
Method Details
-
getProperty
- Specified by:
getPropertyin interfaceorg.osgi.framework.BundleContext
-
getBundle
public org.osgi.framework.Bundle getBundle()- Specified by:
getBundlein interfaceorg.osgi.framework.BundleContext- Specified by:
getBundlein interfaceorg.osgi.framework.BundleReference
-
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
-
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
-
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
-
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener listener) - Specified by:
addServiceListenerin interfaceorg.osgi.framework.BundleContext
-
removeServiceListener
public void removeServiceListener(org.osgi.framework.ServiceListener listener) - Specified by:
removeServiceListenerin interfaceorg.osgi.framework.BundleContext
-
addBundleListener
public void addBundleListener(org.osgi.framework.BundleListener listener) - Specified by:
addBundleListenerin interfaceorg.osgi.framework.BundleContext
-
removeBundleListener
public void removeBundleListener(org.osgi.framework.BundleListener listener) - Specified by:
removeBundleListenerin interfaceorg.osgi.framework.BundleContext
-
addFrameworkListener
public void addFrameworkListener(org.osgi.framework.FrameworkListener listener) - Specified by:
addFrameworkListenerin interfaceorg.osgi.framework.BundleContext
-
removeFrameworkListener
public void removeFrameworkListener(org.osgi.framework.FrameworkListener listener) - Specified by:
removeFrameworkListenerin interfaceorg.osgi.framework.BundleContext
-
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
-
registerService
public <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> clazz, S service, Dictionary<String, ?> properties) - Specified by:
registerServicein interfaceorg.osgi.framework.BundleContext
-
registerService
public <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> clazz, org.osgi.framework.ServiceFactory<S> factory, Dictionary<String, ?> properties) - Specified by:
registerServicein 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
-
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
-
getServiceReference
- Specified by:
getServiceReferencein interfaceorg.osgi.framework.BundleContext
-
getServiceReference
- Specified by:
getServiceReferencein interfaceorg.osgi.framework.BundleContext
-
getServiceReferences
public <S> Collection<org.osgi.framework.ServiceReference<S>> getServiceReferences(Class<S> clazz, String filter) throws org.osgi.framework.InvalidSyntaxException - Specified by:
getServiceReferencesin interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.InvalidSyntaxException
-
getService
- Specified by:
getServicein interfaceorg.osgi.framework.BundleContext
-
getServiceObjects
public <S> org.osgi.framework.ServiceObjects<S> getServiceObjects(org.osgi.framework.ServiceReference<S> reference) - Specified by:
getServiceObjectsin interfaceorg.osgi.framework.BundleContext
-
ungetService
public boolean ungetService(org.osgi.framework.ServiceReference reference) - Specified by:
ungetServicein interfaceorg.osgi.framework.BundleContext
-
getDataFile
- Specified by:
getDataFilein interfaceorg.osgi.framework.BundleContext
-
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
-
getBundle
- Specified by:
getBundlein interfaceorg.osgi.framework.BundleContext
-
synchronizeCollection
-