|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.dependencymanager.ServiceDependency
public abstract class ServiceDependency
Service dependency that can track an OSGi service.
Constructor Summary | |
---|---|
ServiceDependency()
|
Method Summary | |
---|---|
abstract boolean |
isAutoConfig()
Returns true>code> if auto configuration is enabled for this dependency. |
abstract boolean |
isAvailable()
Returns true if the dependency is available. |
abstract boolean |
isRequired()
Returns true if this a required dependency. |
abstract ServiceDependency |
setAutoConfig(boolean autoConfig)
Sets auto configuration for this service. |
abstract ServiceDependency |
setAutoConfig(String instanceName)
Sets auto configuration for this service. |
ServiceDependency |
setCallbacks(Object instance,
String added,
String removed)
Sets the callbacks for this service. |
abstract ServiceDependency |
setCallbacks(Object instance,
String added,
String changed,
String removed)
Sets the callbacks for this service. |
ServiceDependency |
setCallbacks(String added,
String removed)
Sets the callbacks for this service. |
ServiceDependency |
setCallbacks(String added,
String changed,
String removed)
Sets the callbacks for this service. |
abstract ServiceDependency |
setDefaultImplementation(Object implementation)
Sets the default implementation for this service dependency. |
abstract ServiceDependency |
setRequired(boolean required)
Sets the required flag which determines if this service is required or not. |
abstract ServiceDependency |
setService(Class serviceName)
Sets the name of the service that should be tracked. |
abstract ServiceDependency |
setService(Class serviceName,
ServiceReference serviceReference)
Sets the name of the service that should be tracked. |
abstract ServiceDependency |
setService(Class serviceName,
String serviceFilter)
Sets the name of the service that should be tracked. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceDependency()
Method Detail |
---|
public abstract ServiceDependency setService(Class serviceName)
serviceName
- the name of the service
public abstract ServiceDependency setService(Class serviceName, String serviceFilter)
serviceName
- the name of the serviceserviceFilter
- the filter condition
public abstract ServiceDependency setService(Class serviceName, ServiceReference serviceReference)
serviceName
- the name of the serviceserviceReference
- the service reference to track
public abstract ServiceDependency setDefaultImplementation(Object implementation)
implementation
- the instance to use or the class to instantiate if you want to lazily
instantiate this implementation
public abstract ServiceDependency setRequired(boolean required)
required
- the required flag
public abstract ServiceDependency setAutoConfig(boolean autoConfig)
autoConfig
- the value of auto config
public abstract ServiceDependency setAutoConfig(String instanceName)
instanceName
- the name of attribute to auto config
public ServiceDependency setCallbacks(String added, String removed)
added
- the method to call when a service was addedremoved
- the method to call when a service was removed
public ServiceDependency setCallbacks(String added, String changed, String removed)
added
- 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 ServiceDependency setCallbacks(Object instance, String added, String removed)
instance
- the instance to call the callbacks onadded
- the method to call when a service was addedremoved
- the method to call when a service was removed
public abstract ServiceDependency setCallbacks(Object instance, String added, String changed, String removed)
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 abstract boolean isAutoConfig()
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.
- Returns:
true>code> if auto configuration is enabled for this dependency
public abstract boolean isAvailable()
true
if the dependency is available.
isAvailable
in interface Dependency
true
if the dependency is availablepublic abstract boolean isRequired()
true
if this a required dependency. Required dependencies
are dependencies that must be available before the service can be activated.
isRequired
in interface Dependency
true
if the dependency is required
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |