Class FakeBundleContext
java.lang.Object
de.uni_hildesheim.sse.easy.loader.framework.FakeBundleContext
- All Implemented Interfaces:
org.osgi.framework.BundleContext,org.osgi.framework.BundleReference
Implements a fake bundle context.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBundleListener(org.osgi.framework.BundleListener arg0) voidaddFrameworkListener(org.osgi.framework.FrameworkListener arg0) voidaddServiceListener(org.osgi.framework.ServiceListener arg0) voidaddServiceListener(org.osgi.framework.ServiceListener arg0, String arg1) org.osgi.framework.FiltercreateFilter(String arg0) org.osgi.framework.ServiceReference<?>[]getAllServiceReferences(String arg0, String arg1) org.osgi.framework.Bundleorg.osgi.framework.BundlegetBundle(long arg0) org.osgi.framework.Bundleorg.osgi.framework.Bundle[]getDataFile(String arg0) getProperty(String arg0) <S> SgetService(org.osgi.framework.ServiceReference<S> arg0) <S> org.osgi.framework.ServiceObjects<S> getServiceObjects(org.osgi.framework.ServiceReference<S> reference) <S> org.osgi.framework.ServiceReference<S> getServiceReference(Class<S> arg0) org.osgi.framework.ServiceReference<?> getServiceReference(String arg0) <S> Collection<org.osgi.framework.ServiceReference<S>> getServiceReferences(Class<S> arg0, String arg1) org.osgi.framework.ServiceReference<?>[]getServiceReferences(String arg0, String arg1) org.osgi.framework.BundleinstallBundle(String arg0) org.osgi.framework.BundleinstallBundle(String arg0, InputStream arg1) <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> arg0, S arg1, Dictionary<String, ?> arg2) org.osgi.framework.ServiceRegistration<?> registerService(String[] arg0, Object arg1, Dictionary<String, ?> arg2) org.osgi.framework.ServiceRegistration<?> registerService(String arg0, Object arg1, Dictionary<String, ?> arg2) voidremoveBundleListener(org.osgi.framework.BundleListener arg0) voidremoveFrameworkListener(org.osgi.framework.FrameworkListener arg0) voidremoveServiceListener(org.osgi.framework.ServiceListener arg0) booleanungetService(org.osgi.framework.ServiceReference<?> arg0)
-
Field Details
-
INSTANCE
public static final org.osgi.framework.BundleContext INSTANCE -
bundle
private org.osgi.framework.Bundle bundle
-
-
Constructor Details
-
FakeBundleContext
public FakeBundleContext()
-
-
Method Details
-
addBundleListener
public void addBundleListener(org.osgi.framework.BundleListener arg0) - Specified by:
addBundleListenerin interfaceorg.osgi.framework.BundleContext
-
addFrameworkListener
public void addFrameworkListener(org.osgi.framework.FrameworkListener arg0) - Specified by:
addFrameworkListenerin interfaceorg.osgi.framework.BundleContext
-
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener arg0) - Specified by:
addServiceListenerin interfaceorg.osgi.framework.BundleContext
-
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener arg0, String arg1) 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 arg0) 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 arg0, String arg1) 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- Specified by:
getBundlein interfaceorg.osgi.framework.BundleReference
-
getBundle
public org.osgi.framework.Bundle getBundle(long arg0) - Specified by:
getBundlein interfaceorg.osgi.framework.BundleContext
-
getBundle
- Specified by:
getBundlein interfaceorg.osgi.framework.BundleContext
-
getBundles
public org.osgi.framework.Bundle[] getBundles()- Specified by:
getBundlesin interfaceorg.osgi.framework.BundleContext
-
getDataFile
- Specified by:
getDataFilein interfaceorg.osgi.framework.BundleContext
-
getProperty
- Specified by:
getPropertyin interfaceorg.osgi.framework.BundleContext
-
getService
public <S> S getService(org.osgi.framework.ServiceReference<S> arg0) - Specified by:
getServicein interfaceorg.osgi.framework.BundleContext
-
getServiceReference
- Specified by:
getServiceReferencein interfaceorg.osgi.framework.BundleContext
-
getServiceReference
- Specified by:
getServiceReferencein interfaceorg.osgi.framework.BundleContext
-
getServiceReferences
public org.osgi.framework.ServiceReference<?>[] getServiceReferences(String arg0, String arg1) throws org.osgi.framework.InvalidSyntaxException - Specified by:
getServiceReferencesin interfaceorg.osgi.framework.BundleContext- Throws:
org.osgi.framework.InvalidSyntaxException
-
getServiceReferences
public <S> Collection<org.osgi.framework.ServiceReference<S>> getServiceReferences(Class<S> arg0, String arg1) 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 arg0) 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 arg0, InputStream arg1) 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[] arg0, Object arg1, Dictionary<String, ?> arg2) - Specified by:
registerServicein interfaceorg.osgi.framework.BundleContext
-
registerService
public org.osgi.framework.ServiceRegistration<?> registerService(String arg0, Object arg1, Dictionary<String, ?> arg2) - 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
-
registerService
public <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> arg0, S arg1, Dictionary<String, ?> arg2) - Specified by:
registerServicein interfaceorg.osgi.framework.BundleContext
-
removeBundleListener
public void removeBundleListener(org.osgi.framework.BundleListener arg0) - Specified by:
removeBundleListenerin interfaceorg.osgi.framework.BundleContext
-
removeFrameworkListener
public void removeFrameworkListener(org.osgi.framework.FrameworkListener arg0) - Specified by:
removeFrameworkListenerin interfaceorg.osgi.framework.BundleContext
-
removeServiceListener
public void removeServiceListener(org.osgi.framework.ServiceListener arg0) - Specified by:
removeServiceListenerin interfaceorg.osgi.framework.BundleContext
-
ungetService
public boolean ungetService(org.osgi.framework.ServiceReference<?> arg0) - Specified by:
ungetServicein 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
-