|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.util.DependencyModel
org.apache.felix.ipojo.composite.service.instantiator.SvcInstance
public class SvcInstance
Manage a service instantiation. This service create component instance providing the required service specification.
Field Summary |
---|
Fields inherited from class org.apache.felix.ipojo.util.DependencyModel |
---|
BROKEN, DYNAMIC_BINDING_POLICY, DYNAMIC_PRIORITY_BINDING_POLICY, RESOLVED, STATIC_BINDING_POLICY, UNRESOLVED |
Constructor Summary | |
---|---|
SvcInstance(ServiceDependencyHandler handler,
String spec,
Dictionary conf,
boolean isAgg,
boolean isOpt,
Filter filt,
Comparator cmp,
int policy)
Constructor. |
Method Summary | |
---|---|
void |
freeze()
Freeze the set of used provider. |
protected Map |
getMatchingFactories()
Get the map of used references [reference, component instance]. |
String |
getServiceSpecification()
Get the required specification. |
boolean |
isFrozen()
Is the reference set frozen (cannot change anymore)? This method must be override by concrete dependency to support the static binding policy. |
boolean |
match(ServiceReference fact)
Does the service instance match with the given factory ? |
void |
onDependencyReconfiguration(ServiceReference[] departs,
ServiceReference[] arrivals)
On Dependency Reconfiguration notification method. |
void |
onServiceArrival(ServiceReference ref)
A new service is injected. |
void |
onServiceDeparture(ServiceReference ref)
A used service is leaving. |
void |
onServiceModification(ServiceReference arg0)
A factory is modified. |
void |
stop()
Stop the service instance. |
void |
unfreeze()
Unfreezes. |
Methods inherited from class org.apache.felix.ipojo.util.DependencyModel |
---|
addedService, addingService, getBindingPolicy, getComparator, getComparator, getFilter, getPolicy, getService, getServiceReference, getServiceReferences, getSize, getSpecification, getState, getUsedServiceReferences, isAggregate, isOptional, loadSpecification, manageModification, modifiedService, removedService, setAggregate, setBindingPolicy, setBundleContext, setComparator, setFilter, setOptionality, setSpecification, start, ungetService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SvcInstance(ServiceDependencyHandler handler, String spec, Dictionary conf, boolean isAgg, boolean isOpt, Filter filt, 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 policy
ConfigurationException
- : an attribute cannot be parsed correctly, or is incorrect.Method Detail |
---|
public void stop()
stop
in class DependencyModel
public boolean isFrozen()
DependencyModel
false
by default.
The method must always return false
for non-static dependencies.
isFrozen
in class DependencyModel
true
if the reference set is frozen.public void freeze()
public void unfreeze()
unfreeze
in class DependencyModel
public boolean match(ServiceReference fact)
match
in class DependencyModel
fact
- : the factory to test.
public String getServiceSpecification()
protected Map getMatchingFactories()
public void onDependencyReconfiguration(ServiceReference[] departs, 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(ServiceReference ref)
onServiceArrival
in class DependencyModel
ref
- : service reference.DependencyModel.onServiceArrival(org.osgi.framework.ServiceReference)
public void onServiceDeparture(ServiceReference ref)
onServiceDeparture
in class DependencyModel
ref
- : leaving service reference.DependencyModel.onServiceDeparture(org.osgi.framework.ServiceReference)
public void onServiceModification(ServiceReference arg0)
onServiceModification
in class DependencyModel
arg0
- the service referenceDependencyModel.onServiceModification(org.osgi.framework.ServiceReference)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |