S
- the type of the service being registered.public class MockServiceReference<S> extends MockServiceReferenceBase<S>
This object is usually not created when writing unit tests, it
is returned when retrieving a service from MockBundleContext
or returned through a listener object.
Modifier and Type | Field and Description |
---|---|
(package private) org.osgi.framework.Bundle |
bundle |
private Dictionary<String,?> |
properties |
Constructor and Description |
---|
MockServiceReference(org.osgi.framework.Bundle bundle,
Dictionary<String,?> properties) |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Bundle |
getBundle() |
Object |
getProperty(String key) |
String[] |
getPropertyKeys() |
compareTo, getUsingBundles, isAssignableTo
org.osgi.framework.Bundle bundle
private Dictionary<String,?> properties
public MockServiceReference(org.osgi.framework.Bundle bundle, Dictionary<String,?> properties)
public Object getProperty(String key)
getProperty
in interface org.osgi.framework.ServiceReference<S>
getProperty
in class MockServiceReferenceBase<S>
public String[] getPropertyKeys()
getPropertyKeys
in interface org.osgi.framework.ServiceReference<S>
getPropertyKeys
in class MockServiceReferenceBase<S>
public org.osgi.framework.Bundle getBundle()
getBundle
in interface org.osgi.framework.ServiceReference<S>
getBundle
in class MockServiceReferenceBase<S>
Copyright © 2018. All rights reserved.