public class DMXTestBundleContext extends Object implements org.osgi.framework.BundleContext
BundleContext
for use in unit tests. This class implements
only partially methods from BundleContext
.Constructor and Description |
---|
DMXTestBundleContext()
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addBundleListener(org.osgi.framework.BundleListener bl) |
void |
addFrameworkListener(org.osgi.framework.FrameworkListener fl) |
void |
addServiceListener(org.osgi.framework.ServiceListener sl) |
void |
addServiceListener(org.osgi.framework.ServiceListener sl,
String string) |
org.osgi.framework.Filter |
createFilter(String string) |
org.osgi.framework.ServiceReference<?>[] |
getAllServiceReferences(String string,
String string1) |
org.osgi.framework.Bundle |
getBundle() |
org.osgi.framework.Bundle |
getBundle(long l) |
org.osgi.framework.Bundle |
getBundle(String string) |
org.osgi.framework.Bundle[] |
getBundles() |
File |
getDataFile(String string) |
String |
getProperty(String string) |
<S> S |
getService(org.osgi.framework.ServiceReference<S> sr) |
<S> org.osgi.framework.ServiceReference<S> |
getServiceReference(Class<S> type) |
org.osgi.framework.ServiceReference<?> |
getServiceReference(String name) |
<S> Collection<org.osgi.framework.ServiceReference<S>> |
getServiceReferences(Class<S> type,
String string) |
org.osgi.framework.ServiceReference<?>[] |
getServiceReferences(String string,
String string1) |
org.osgi.framework.Bundle |
installBundle(String string) |
org.osgi.framework.Bundle |
installBundle(String string,
InputStream in) |
<S> org.osgi.framework.ServiceRegistration<S> |
registerService(Class<S> type,
S s,
Dictionary<String,?> dctnr) |
org.osgi.framework.ServiceRegistration<?> |
registerService(String[] strings,
Object o,
Dictionary<String,?> dctnr) |
org.osgi.framework.ServiceRegistration<?> |
registerService(String string,
Object o,
Dictionary<String,?> dctnr) |
void |
removeBundleListener(org.osgi.framework.BundleListener bl) |
void |
removeFrameworkListener(org.osgi.framework.FrameworkListener fl) |
void |
removeServiceListener(org.osgi.framework.ServiceListener sl) |
boolean |
ungetService(org.osgi.framework.ServiceReference<?> sr) |
public String getProperty(String string)
getProperty
in interface org.osgi.framework.BundleContext
public org.osgi.framework.Bundle getBundle()
getBundle
in interface org.osgi.framework.BundleContext
getBundle
in interface org.osgi.framework.BundleReference
public org.osgi.framework.Bundle installBundle(String string, InputStream in) throws org.osgi.framework.BundleException
installBundle
in interface org.osgi.framework.BundleContext
org.osgi.framework.BundleException
public org.osgi.framework.Bundle installBundle(String string) throws org.osgi.framework.BundleException
installBundle
in interface org.osgi.framework.BundleContext
org.osgi.framework.BundleException
public org.osgi.framework.Bundle getBundle(long l)
getBundle
in interface org.osgi.framework.BundleContext
public org.osgi.framework.Bundle[] getBundles()
getBundles
in interface org.osgi.framework.BundleContext
public void addServiceListener(org.osgi.framework.ServiceListener sl, String string) throws org.osgi.framework.InvalidSyntaxException
addServiceListener
in interface org.osgi.framework.BundleContext
org.osgi.framework.InvalidSyntaxException
public void addServiceListener(org.osgi.framework.ServiceListener sl)
addServiceListener
in interface org.osgi.framework.BundleContext
public void removeServiceListener(org.osgi.framework.ServiceListener sl)
removeServiceListener
in interface org.osgi.framework.BundleContext
public void addBundleListener(org.osgi.framework.BundleListener bl)
addBundleListener
in interface org.osgi.framework.BundleContext
public void removeBundleListener(org.osgi.framework.BundleListener bl)
removeBundleListener
in interface org.osgi.framework.BundleContext
public void addFrameworkListener(org.osgi.framework.FrameworkListener fl)
addFrameworkListener
in interface org.osgi.framework.BundleContext
public void removeFrameworkListener(org.osgi.framework.FrameworkListener fl)
removeFrameworkListener
in interface org.osgi.framework.BundleContext
public org.osgi.framework.ServiceRegistration<?> registerService(String[] strings, Object o, Dictionary<String,?> dctnr)
registerService
in interface org.osgi.framework.BundleContext
public org.osgi.framework.ServiceRegistration<?> registerService(String string, Object o, Dictionary<String,?> dctnr)
registerService
in interface org.osgi.framework.BundleContext
public <S> org.osgi.framework.ServiceRegistration<S> registerService(Class<S> type, S s, Dictionary<String,?> dctnr)
registerService
in interface org.osgi.framework.BundleContext
public org.osgi.framework.ServiceReference<?>[] getServiceReferences(String string, String string1) throws org.osgi.framework.InvalidSyntaxException
getServiceReferences
in interface org.osgi.framework.BundleContext
org.osgi.framework.InvalidSyntaxException
public org.osgi.framework.ServiceReference<?>[] getAllServiceReferences(String string, String string1) throws org.osgi.framework.InvalidSyntaxException
getAllServiceReferences
in interface org.osgi.framework.BundleContext
org.osgi.framework.InvalidSyntaxException
public org.osgi.framework.ServiceReference<?> getServiceReference(String name)
getServiceReference
in interface org.osgi.framework.BundleContext
public <S> org.osgi.framework.ServiceReference<S> getServiceReference(Class<S> type)
getServiceReference
in interface org.osgi.framework.BundleContext
public <S> Collection<org.osgi.framework.ServiceReference<S>> getServiceReferences(Class<S> type, String string) throws org.osgi.framework.InvalidSyntaxException
getServiceReferences
in interface org.osgi.framework.BundleContext
org.osgi.framework.InvalidSyntaxException
public <S> S getService(org.osgi.framework.ServiceReference<S> sr)
getService
in interface org.osgi.framework.BundleContext
public boolean ungetService(org.osgi.framework.ServiceReference<?> sr)
ungetService
in interface org.osgi.framework.BundleContext
public File getDataFile(String string)
getDataFile
in interface org.osgi.framework.BundleContext
public org.osgi.framework.Filter createFilter(String string) throws org.osgi.framework.InvalidSyntaxException
createFilter
in interface org.osgi.framework.BundleContext
org.osgi.framework.InvalidSyntaxException
public org.osgi.framework.Bundle getBundle(String string)
getBundle
in interface org.osgi.framework.BundleContext
Copyright © 2012-2014 Vektor Software. All Rights Reserved.