|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.dependencymanager.ServiceDependency
org.apache.felix.dependencymanager.impl.ServiceDependencyImpl
public class ServiceDependencyImpl
Constructor Summary | |
---|---|
ServiceDependencyImpl(DependencyManager dm)
|
Method Summary | |
---|---|
ServiceDependency |
getDelegate()
|
boolean |
isAutoConfig()
Returns true>code> if auto configuration is enabled for this dependency. |
boolean |
isAvailable()
Returns true if the dependency is available. |
boolean |
isRequired()
Returns true if this a required dependency. |
ServiceDependency |
setAutoConfig(boolean autoConfig)
Sets auto configuration for this service. |
ServiceDependency |
setAutoConfig(String instanceName)
Sets auto configuration for this service. |
ServiceDependency |
setCallbacks(Object instance,
String added,
String changed,
String removed)
Sets the callbacks for this service. |
ServiceDependency |
setDefaultImplementation(Object implementation)
Sets the default implementation for this service dependency. |
ServiceDependency |
setRequired(boolean required)
Sets the required flag which determines if this service is required or not. |
ServiceDependency |
setService(Class serviceName)
Sets the name of the service that should be tracked. |
ServiceDependency |
setService(Class serviceName,
ServiceReference serviceReference)
Sets the name of the service that should be tracked. |
ServiceDependency |
setService(Class serviceName,
String serviceFilter)
Sets the name of the service that should be tracked. |
Methods inherited from class org.apache.felix.dependencymanager.ServiceDependency |
---|
setCallbacks, setCallbacks, setCallbacks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceDependencyImpl(DependencyManager dm)
Method Detail |
---|
public ServiceDependency getDelegate()
public ServiceDependency setService(Class serviceName)
ServiceDependency
setService
in class ServiceDependency
serviceName
- the name of the service
public ServiceDependency setService(Class serviceName, String serviceFilter)
ServiceDependency
setService
in class ServiceDependency
serviceName
- the name of the serviceserviceFilter
- the filter condition
public ServiceDependency setService(Class serviceName, ServiceReference serviceReference)
ServiceDependency
setService
in class ServiceDependency
serviceName
- the name of the serviceserviceReference
- the service reference to track
public ServiceDependency setDefaultImplementation(Object implementation)
ServiceDependency
setDefaultImplementation
in class ServiceDependency
implementation
- the instance to use or the class to instantiate if you want to lazily
instantiate this implementation
public ServiceDependency setRequired(boolean required)
ServiceDependency
setRequired
in class ServiceDependency
required
- the required flag
public ServiceDependency setAutoConfig(boolean autoConfig)
ServiceDependency
setAutoConfig
in class ServiceDependency
autoConfig
- the value of auto config
public ServiceDependency setAutoConfig(String instanceName)
ServiceDependency
setAutoConfig
in class ServiceDependency
instanceName
- the name of attribute to auto config
public ServiceDependency setCallbacks(Object instance, String added, String changed, String removed)
ServiceDependency
setCallbacks
in class ServiceDependency
instance
- the instance to call the callbacks onadded
- the method to call when a service was addedchanged
- the method to call when a service was changedremoved
- the method to call when a service was removed
public boolean isAutoConfig()
ServiceDependency
true>code> if auto configuration is enabled for this dependency.
Auto configuration means that a dependency is injected in the service instance
when it's available, and if it's unavailable, a "null object" will be inserted
instead.
- Specified by:
isAutoConfig
in class ServiceDependency
- Returns:
true>code> if auto configuration is enabled for this dependency
public boolean isAvailable()
ServiceDependency
true
if the dependency is available.
isAvailable
in interface Dependency
isAvailable
in class ServiceDependency
true
if the dependency is availablepublic boolean isRequired()
ServiceDependency
true
if this a required dependency. Required dependencies
are dependencies that must be available before the service can be activated.
isRequired
in interface Dependency
isRequired
in class ServiceDependency
true
if the dependency is required
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |