public class SvcInstance extends DependencyModel
DependencyModel.DependencyEventType, DependencyModel.ServiceBindingHolder
BROKEN, DYNAMIC_BINDING_POLICY, DYNAMIC_PRIORITY_BINDING_POLICY, m_serviceReferenceManager, RESOLVED, STATIC_BINDING_POLICY, UNRESOLVED
Constructor and Description |
---|
SvcInstance(ServiceDependencyHandler handler,
java.lang.String spec,
java.util.Dictionary conf,
boolean isAgg,
boolean isOpt,
org.osgi.framework.Filter filt,
java.util.Comparator cmp,
int policy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
freeze()
Freeze the set of used provider.
|
protected java.util.Map |
getMatchingFactories()
Get the map of used references [reference, component instance].
|
java.lang.String |
getServiceSpecification()
Get the required specification.
|
boolean |
isFrozen() |
boolean |
match(org.osgi.framework.ServiceReference fact)
Does the service instance match with the given factory ?
|
void |
onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs,
org.osgi.framework.ServiceReference[] arrivals)
On Dependency Reconfiguration notification method.
|
void |
onServiceArrival(org.osgi.framework.ServiceReference ref)
A new service is injected.
|
void |
onServiceDeparture(org.osgi.framework.ServiceReference ref)
A used service is leaving.
|
void |
onServiceModification(org.osgi.framework.ServiceReference arg0)
A factory is modified.
|
void |
stop()
Stop the service instance.
|
void |
unfreeze()
Unfreezes.
|
acquireReadLockIfNotHeld, acquireWriteLockIfNotHeld, addListener, applyReconfiguration, cleanup, getBindingPolicy, getBundleContext, getComparator, getComponentInstance, getContextSourceManager, getFilter, getId, getService, getService, getServiceReference, getServiceReferenceManager, getServiceReferences, getSize, getSpecification, getState, getTracker, getUsedServiceReferences, invalidateMatchingServices, invalidateSelectedServices, isAggregate, isOptional, notifyListeners, onChange, releaseReadLockIfHeld, releaseWriteLockIfHeld, removeListener, setAggregate, setBundleContext, setComparator, setFilter, setOptionality, setSpecification, start, ungetService
public SvcInstance(ServiceDependencyHandler handler, java.lang.String spec, java.util.Dictionary conf, boolean isAgg, boolean isOpt, org.osgi.framework.Filter filt, java.util.Comparator cmp, int policy) throws ConfigurationException
handler
- : the handler.spec
- : required specification.conf
- : instance configuration.isAgg
- : is the service instance an aggregate service ?isOpt
- : is the service instance optional ?filt
- : LDAP filtercmp
- : comparator to use for the trackingpolicy
- : binding policyConfigurationException
- : an attribute cannot be parsed correctly, or is incorrect.public void stop()
stop
in class DependencyModel
public boolean isFrozen()
isFrozen
in class DependencyModel
public void freeze()
public void unfreeze()
unfreeze
in class DependencyModel
public boolean match(org.osgi.framework.ServiceReference fact)
match
in class DependencyModel
fact
- : the factory to test.public java.lang.String getServiceSpecification()
protected java.util.Map getMatchingFactories()
public void onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs, org.osgi.framework.ServiceReference[] arrivals)
onDependencyReconfiguration
in class DependencyModel
departs
- : leaving service references.arrivals
- : new injected service references.DependencyModel.onDependencyReconfiguration(org.osgi.framework.ServiceReference[], org.osgi.framework.ServiceReference[])
public void onServiceArrival(org.osgi.framework.ServiceReference ref)
onServiceArrival
in class DependencyModel
ref
- : service reference.DependencyModel.onServiceArrival(org.osgi.framework.ServiceReference)
public void onServiceDeparture(org.osgi.framework.ServiceReference ref)
onServiceDeparture
in class DependencyModel
ref
- : leaving service reference.DependencyModel.onServiceDeparture(org.osgi.framework.ServiceReference)
public void onServiceModification(org.osgi.framework.ServiceReference arg0)
onServiceModification
in class DependencyModel
arg0
- the service referenceDependencyModel.onServiceModification(org.osgi.framework.ServiceReference)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.