public class MockServiceRegistration extends Object implements org.osgi.framework.ServiceRegistration
setProperties(Dictionary)
) as long as the underlying reference is
of type MockServiceReference
.Constructor and Description |
---|
MockServiceRegistration()
Constructs a new
MockServiceRegistration instance using
defaults. |
MockServiceRegistration(Dictionary props)
Constructs a new
MockServiceRegistration instance with the
given properties. |
MockServiceRegistration(String[] clazz,
Dictionary props)
Constructs a new
MockServiceRegistration instance using
the given class names and properties. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
org.osgi.framework.ServiceReference |
getReference() |
int |
hashCode() |
void |
setProperties(Dictionary props) |
void |
setReference(org.osgi.framework.ServiceReference reference)
Sets the service reference associated with this registration.
|
void |
unregister() |
public MockServiceRegistration()
MockServiceRegistration
instance using
defaults.public MockServiceRegistration(Dictionary props)
MockServiceRegistration
instance with the
given properties.props
- registration propertiespublic MockServiceRegistration(String[] clazz, Dictionary props)
MockServiceRegistration
instance using
the given class names and properties.clazz
- props
- public org.osgi.framework.ServiceReference getReference()
getReference
in interface org.osgi.framework.ServiceRegistration
public void setReference(org.osgi.framework.ServiceReference reference)
reference
- service referencepublic void setProperties(Dictionary props)
setProperties
in interface org.osgi.framework.ServiceRegistration
public void unregister()
unregister
in interface org.osgi.framework.ServiceRegistration
Copyright © 2006–2014. All rights reserved.