public class MockBundleContext extends Object implements org.osgi.framework.BundleContext
| Constructor and Description |
|---|
MockBundleContext(MockBundle bundle) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBundleListener(org.osgi.framework.BundleListener bundleListener) |
void |
addFrameworkListener(org.osgi.framework.FrameworkListener frameworkListener) |
void |
addServiceListener(org.osgi.framework.ServiceListener serviceListener) |
void |
addServiceListener(org.osgi.framework.ServiceListener serviceListener,
String s) |
org.osgi.framework.Filter |
createFilter(String s) |
org.osgi.framework.ServiceReference[] |
getAllServiceReferences(String s,
String s1) |
org.osgi.framework.Bundle |
getBundle() |
org.osgi.framework.Bundle |
getBundle(long l) |
org.osgi.framework.Bundle |
getBundle(String location) |
org.osgi.framework.Bundle[] |
getBundles() |
File |
getDataFile(String s) |
String |
getProperty(String s) |
Object |
getService(org.osgi.framework.ServiceReference serviceReference) |
<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.ServiceReference |
getServiceReference(String s) |
<S> Collection<org.osgi.framework.ServiceReference<S>> |
getServiceReferences(Class<S> clazz,
String filter) |
org.osgi.framework.ServiceReference[] |
getServiceReferences(String s,
String s1) |
org.osgi.framework.Bundle |
installBundle(String s) |
org.osgi.framework.Bundle |
installBundle(String s,
InputStream inputStream) |
<S> org.osgi.framework.ServiceRegistration<S> |
registerService(Class<S> clazz,
S service,
Dictionary<String,?> properties) |
<S> org.osgi.framework.ServiceRegistration<S> |
registerService(Class<S> clazz,
org.osgi.framework.ServiceFactory<S> factory,
Dictionary<String,?> properties) |
org.osgi.framework.ServiceRegistration |
registerService(String[] strings,
Object o,
Dictionary dictionary) |
org.osgi.framework.ServiceRegistration |
registerService(String s,
Object o,
Dictionary dictionary) |
void |
removeBundleListener(org.osgi.framework.BundleListener bundleListener) |
void |
removeFrameworkListener(org.osgi.framework.FrameworkListener frameworkListener) |
void |
removeServiceListener(org.osgi.framework.ServiceListener serviceListener) |
boolean |
ungetService(org.osgi.framework.ServiceReference serviceReference) |
public MockBundleContext(MockBundle bundle)
public String getProperty(String s)
getProperty in interface org.osgi.framework.BundleContextpublic org.osgi.framework.Bundle getBundle()
getBundle in interface org.osgi.framework.BundleContextgetBundle in interface org.osgi.framework.BundleReferencepublic org.osgi.framework.Bundle installBundle(String s) throws org.osgi.framework.BundleException
installBundle in interface org.osgi.framework.BundleContextorg.osgi.framework.BundleExceptionpublic org.osgi.framework.Bundle installBundle(String s, InputStream inputStream) throws org.osgi.framework.BundleException
installBundle in interface org.osgi.framework.BundleContextorg.osgi.framework.BundleExceptionpublic org.osgi.framework.Bundle getBundle(long l)
getBundle in interface org.osgi.framework.BundleContextpublic org.osgi.framework.Bundle[] getBundles()
getBundles in interface org.osgi.framework.BundleContextpublic void addServiceListener(org.osgi.framework.ServiceListener serviceListener,
String s)
throws org.osgi.framework.InvalidSyntaxException
addServiceListener in interface org.osgi.framework.BundleContextorg.osgi.framework.InvalidSyntaxExceptionpublic void addServiceListener(org.osgi.framework.ServiceListener serviceListener)
addServiceListener in interface org.osgi.framework.BundleContextpublic void removeServiceListener(org.osgi.framework.ServiceListener serviceListener)
removeServiceListener in interface org.osgi.framework.BundleContextpublic void addBundleListener(org.osgi.framework.BundleListener bundleListener)
addBundleListener in interface org.osgi.framework.BundleContextpublic void removeBundleListener(org.osgi.framework.BundleListener bundleListener)
removeBundleListener in interface org.osgi.framework.BundleContextpublic void addFrameworkListener(org.osgi.framework.FrameworkListener frameworkListener)
addFrameworkListener in interface org.osgi.framework.BundleContextpublic void removeFrameworkListener(org.osgi.framework.FrameworkListener frameworkListener)
removeFrameworkListener in interface org.osgi.framework.BundleContextpublic org.osgi.framework.ServiceRegistration registerService(String[] strings, Object o, Dictionary dictionary)
registerService in interface org.osgi.framework.BundleContextpublic org.osgi.framework.ServiceRegistration registerService(String s, Object o, Dictionary dictionary)
registerService in interface org.osgi.framework.BundleContextpublic org.osgi.framework.ServiceReference[] getServiceReferences(String s, String s1) throws org.osgi.framework.InvalidSyntaxException
getServiceReferences in interface org.osgi.framework.BundleContextorg.osgi.framework.InvalidSyntaxExceptionpublic org.osgi.framework.ServiceReference[] getAllServiceReferences(String s, String s1) throws org.osgi.framework.InvalidSyntaxException
getAllServiceReferences in interface org.osgi.framework.BundleContextorg.osgi.framework.InvalidSyntaxExceptionpublic org.osgi.framework.ServiceReference getServiceReference(String s)
getServiceReference in interface org.osgi.framework.BundleContextpublic Object getService(org.osgi.framework.ServiceReference serviceReference)
getService in interface org.osgi.framework.BundleContextpublic boolean ungetService(org.osgi.framework.ServiceReference serviceReference)
ungetService in interface org.osgi.framework.BundleContextpublic File getDataFile(String s)
getDataFile in interface org.osgi.framework.BundleContextpublic org.osgi.framework.Filter createFilter(String s) throws org.osgi.framework.InvalidSyntaxException
createFilter in interface org.osgi.framework.BundleContextorg.osgi.framework.InvalidSyntaxExceptionpublic <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> clazz, S service, Dictionary<String,?> properties)
registerService in interface org.osgi.framework.BundleContextpublic <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> clazz, org.osgi.framework.ServiceFactory<S> factory, Dictionary<String,?> properties)
registerService in interface org.osgi.framework.BundleContextpublic <S> org.osgi.framework.ServiceReference<S> getServiceReference(Class<S> clazz)
getServiceReference in interface org.osgi.framework.BundleContextpublic <S> Collection<org.osgi.framework.ServiceReference<S>> getServiceReferences(Class<S> clazz, String filter) throws org.osgi.framework.InvalidSyntaxException
getServiceReferences in interface org.osgi.framework.BundleContextorg.osgi.framework.InvalidSyntaxExceptionpublic <S> org.osgi.framework.ServiceObjects<S> getServiceObjects(org.osgi.framework.ServiceReference<S> reference)
getServiceObjects in interface org.osgi.framework.BundleContextpublic org.osgi.framework.Bundle getBundle(String location)
getBundle in interface org.osgi.framework.BundleContextCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.