|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scr.impl.manager.DependencyManager
public class DependencyManager
The DependencyManager
manages the references to services
declared by a single <reference>
Method Summary | |
---|---|
String |
getBindMethodName()
Returns the name of the method called if a service is being bound to the Component or null if no such method is configued. |
String |
getName()
Returns the name of the service reference. |
String |
getServiceName()
Returns the name of the service used by this Reference. |
ServiceReference[] |
getServiceReferences()
Returns an array of references to the services bound to this Reference or null if no services are currently bound. |
String |
getTarget()
Returns the target filter of this dependency as a string or null if this dependency has no target filter set. |
String |
getUnbindMethodName()
Returns the name of the method called if a service is being unbound from the Component or null if no such method is configued. |
String |
getUpdatedMethodName()
Returns the name of the method called if a bound service updates its service registration properties or null if no such method
is configued. |
boolean |
hasGetPermission()
Returns true if the component providing bundle has permission
to get the service described by this reference. |
boolean |
isMultiple()
Returns whether this reference is multiple. |
boolean |
isOptional()
Returns whether this reference is optional. |
boolean |
isSatisfied()
Returns true if this dependency manager is satisfied, that
is if eithern the dependency is optional or the number of services
registered in the framework and available to this dependency manager is
not zero. |
boolean |
isStatic()
Returns true if the reference is defined with static policy. |
void |
serviceChanged(ServiceEvent event)
Called when a registered service changes state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void serviceChanged(ServiceEvent event)
serviceChanged
in interface ServiceListener
event
- The ServiceEvent
object.public String getServiceName()
Reference
interface
attribute of the
reference
element.
getServiceName
in interface Reference
public ServiceReference[] getServiceReferences()
Reference
null
if no services are currently bound.
getServiceReferences
in interface Reference
public boolean isOptional()
Reference
cardinality
attribute of the
reference
element. In other words, this method returns
true
if the cardinality is 0..1 or 0..n.
isOptional
in interface Reference
public boolean isMultiple()
Reference
cardinality
attribute of the
reference
element. In other words, this method returns
true
if the cardinality is 0..n or 1..n.
isMultiple
in interface Reference
public boolean isStatic()
Reference
true
if the reference is defined with static policy.
This method provides access to the policy
element of the
reference
element. true
is returned if the
policy is defined as static.
isStatic
in interface Reference
public String getBindMethodName()
Reference
null
if no such method is configued. This
method provides access to the bind
attribute of the
reference
element.
getBindMethodName
in interface Reference
public String getUnbindMethodName()
Reference
null
if no such method is configued. This
method provides access to the unbind
attribute of the
reference
element.
getUnbindMethodName
in interface Reference
public String getUpdatedMethodName()
Reference
null
if no such method
is configued. This method provides access to the updated
attribute of the reference
element.
For a component declared in a Declarative Services 1.0 and 1.1
descriptor, this method always returns null
.
getUpdatedMethodName
in interface Reference
public String getName()
getName
in interface Reference
public boolean isSatisfied()
true
if this dependency manager is satisfied, that
is if eithern the dependency is optional or the number of services
registered in the framework and available to this dependency manager is
not zero.
isSatisfied
in interface Reference
public boolean hasGetPermission()
true
if the component providing bundle has permission
to get the service described by this reference.
public String getTarget()
null
if this dependency has no target filter set.
getTarget
in interface Reference
null
if
none is set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |