org.apache.felix.dm
Interface ResourceDependency

All Superinterfaces:
ComponentDependencyDeclaration, Dependency, ResourceHandler
All Known Implementing Classes:
ResourceDependencyImpl

public interface ResourceDependency
extends Dependency, ComponentDependencyDeclaration, ResourceHandler


Field Summary
 
Fields inherited from interface org.apache.felix.dm.ComponentDependencyDeclaration
STATE_AVAILABLE_OPTIONAL, STATE_AVAILABLE_REQUIRED, STATE_NAMES, STATE_UNAVAILABLE_OPTIONAL, STATE_UNAVAILABLE_REQUIRED
 
Fields inherited from interface org.apache.felix.dm.ResourceHandler
FILTER, HOST, PATH, PORT, PROTOCOL, URL
 
Method Summary
 ResourceDependency setAutoConfig(boolean autoConfig)
          Sets auto configuration for this service.
 ResourceDependency setAutoConfig(String instanceName)
          Sets auto configuration for this service.
 ResourceDependency setCallbacks(Object instance, String added, String removed)
          Sets the callbacks for this service.
 ResourceDependency setCallbacks(Object instance, String added, String changed, String removed)
          Sets the callbacks for this service.
 ResourceDependency setCallbacks(String added, String removed)
          Sets the callbacks for this service.
 ResourceDependency setCallbacks(String added, String changed, String removed)
          Sets the callbacks for this service.
 ResourceDependency setFilter(String resourceFilter)
           
 ResourceDependency setInstanceBound(boolean isInstanceBound)
           
 ResourceDependency setPropagate(boolean propagate)
           
 ResourceDependency setPropagate(Object instance, String method)
           
 ResourceDependency setRequired(boolean required)
           
 ResourceDependency setResource(URL resource)
           
 
Methods inherited from interface org.apache.felix.dm.Dependency
createCopy, getAutoConfigInstance, getAutoConfigName, getAutoConfigType, getProperties, invokeAdded, invokeRemoved, isAutoConfig, isAvailable, isInstanceBound, isPropagated, isRequired
 
Methods inherited from interface org.apache.felix.dm.ComponentDependencyDeclaration
getName, getState, getType
 
Methods inherited from interface org.apache.felix.dm.ResourceHandler
added, changed, removed
 

Method Detail

setCallbacks

ResourceDependency setCallbacks(String added,
                                String removed)
Sets the callbacks for this service. These callbacks can be used as hooks whenever a dependency is added or removed. When you specify callbacks, the auto configuration feature is automatically turned off, because we're assuming you don't need it in this case.

Parameters:
added - the method to call when a service was added
removed - the method to call when a service was removed
Returns:
this service dependency

setCallbacks

ResourceDependency setCallbacks(String added,
                                String changed,
                                String removed)
Sets the callbacks for this service. These callbacks can be used as hooks whenever a dependency is added, changed or removed. When you specify callbacks, the auto configuration feature is automatically turned off, because we're assuming you don't need it in this case.

Parameters:
added - the method to call when a service was added
changed - the method to call when a service was changed
removed - the method to call when a service was removed
Returns:
this service dependency

setCallbacks

ResourceDependency setCallbacks(Object instance,
                                String added,
                                String removed)
Sets the callbacks for this service. These callbacks can be used as hooks whenever a dependency is added or removed. They are called on the instance you provide. When you specify callbacks, the auto configuration feature is automatically turned off, because we're assuming you don't need it in this case.

Parameters:
instance - the instance to call the callbacks on
added - the method to call when a service was added
removed - the method to call when a service was removed
Returns:
this service dependency

setCallbacks

ResourceDependency setCallbacks(Object instance,
                                String added,
                                String changed,
                                String removed)
Sets the callbacks for this service. These callbacks can be used as hooks whenever a dependency is added, changed or removed. They are called on the instance you provide. When you specify callbacks, the auto configuration feature is automatically turned off, because we're assuming you don't need it in this case.

Parameters:
instance - the instance to call the callbacks on
added - the method to call when a service was added
changed - the method to call when a service was changed
removed - the method to call when a service was removed
Returns:
this service dependency

setAutoConfig

ResourceDependency setAutoConfig(boolean autoConfig)
Sets auto configuration for this service. Auto configuration allows the dependency to fill in any attributes in the service implementation that are of the same type as this dependency. Default is on.

Parameters:
autoConfig - the value of auto config
Returns:
this service dependency

setAutoConfig

ResourceDependency setAutoConfig(String instanceName)
Sets auto configuration for this service. Auto configuration allows the dependency to fill in the attribute in the service implementation that has the same type and instance name.

Parameters:
instanceName - the name of attribute to auto config
Returns:
this service dependency

setResource

ResourceDependency setResource(URL resource)

setRequired

ResourceDependency setRequired(boolean required)

setFilter

ResourceDependency setFilter(String resourceFilter)

setPropagate

ResourceDependency setPropagate(boolean propagate)

setPropagate

ResourceDependency setPropagate(Object instance,
                                String method)

setInstanceBound

ResourceDependency setInstanceBound(boolean isInstanceBound)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.