public class DeviceDependencyHandler extends org.apache.felix.ipojo.handlers.dependency.DependencyHandler implements ApplicationTracker
Modifier and Type | Field and Description |
---|---|
static String |
DYNAMIC_PROXY
Proxy type value: dynamic-proxy.
|
protected static int |
LIST
Dependency Field Type : List.
|
static String |
NAME_SPACE |
static String |
PROXY_DISABLED
Proxy settings value: disabled.
|
static String |
PROXY_ENABLED
Proxy settings value: enabled.
|
static String |
PROXY_SETTINGS_PROPERTY
Proxy settings property.
|
static String |
PROXY_TYPE_PROPERTY
Proxy type property.
|
protected static int |
SET
Dependency Field Type : Set.
|
static String |
SMART_PROXY
Proxy type value: smart.
|
protected static int |
VECTOR
Dependency field type : Vector The dependency will be injected as a vector.
|
Constructor and Description |
---|
DeviceDependencyHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addApplication(Application app)
Called when an application arrives.
|
void |
bundleAdded(Application app,
String symbolicName) |
void |
bundleRemoved(Application app,
String symbolicName) |
protected void |
checkContext()
Check the validity of the dependencies.
|
void |
configure(org.apache.felix.ipojo.metadata.Element componentMetadata,
Dictionary configuration)
Configure the handler.
|
void |
deploymentPackageAdded(Application app,
String symbolicName) |
void |
deploymentPackageRemoved(Application app,
String symbolicName) |
String |
getApplicationId(org.osgi.framework.BundleContext context) |
org.apache.felix.ipojo.handlers.dependency.Dependency[] |
getDependencies()
Get the list of managed dependency.
|
org.apache.felix.ipojo.architecture.HandlerDescription |
getDescription()
Get the dependency handler description.
|
void |
invalidate(org.apache.felix.ipojo.util.DependencyModel dep)
Invalidate method.
|
void |
onCreation(Object instance)
Handler createInstance method.
|
void |
reconfigure(Dictionary configuration)
The instance is reconfigured.
|
void |
removeApplication(Application app)
Called when an application is removed.
|
void |
start()
Handler start method.
|
void |
stateChanged(int state) |
void |
stop()
Handler stop method.
|
void |
validate(org.apache.felix.ipojo.util.DependencyModel dep)
Validate method.
|
createDependencyHandler, getComponentInstance
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onEntry, onError, onExit, onFinally, onGet, onSet, setFactory
public static final String NAME_SPACE
public static final String PROXY_SETTINGS_PROPERTY
public static final String PROXY_TYPE_PROPERTY
public static final String SMART_PROXY
public static final String DYNAMIC_PROXY
public static final String PROXY_ENABLED
public static final String PROXY_DISABLED
protected static final int VECTOR
protected static final int LIST
protected static final int SET
public org.apache.felix.ipojo.handlers.dependency.Dependency[] getDependencies()
getDependencies
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
public void validate(org.apache.felix.ipojo.util.DependencyModel dep)
validate
in interface org.apache.felix.ipojo.util.DependencyStateListener
validate
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
dep
- : the dependency becoming RESOLVED.DependencyStateListener.validate(org.apache.felix.ipojo.util.DependencyModel)
public void invalidate(org.apache.felix.ipojo.util.DependencyModel dep)
invalidate
in interface org.apache.felix.ipojo.util.DependencyStateListener
invalidate
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
dep
- : the dependency becoming UNRESOLVED or BROKEN.DependencyStateListener.invalidate(org.apache.felix.ipojo.util.DependencyModel)
protected void checkContext()
checkContext
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
public void configure(org.apache.felix.ipojo.metadata.Element componentMetadata, Dictionary configuration) throws org.apache.felix.ipojo.ConfigurationException
configure
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
componentMetadata
- : the component type metadataconfiguration
- : the instance configurationorg.apache.felix.ipojo.ConfigurationException
- : one dependency metadata is not correct.Handler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
public void start()
start
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
Handler.start()
public void stop()
stop
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
Handler.stop()
public void onCreation(Object instance)
onCreation
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
instance
- : the created objectPrimitiveHandler.onCreation(Object)
public org.apache.felix.ipojo.architecture.HandlerDescription getDescription()
getDescription
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
Handler.getDescription()
public void reconfigure(Dictionary configuration)
reconfigure
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
configuration
- the new instance configuration.public void stateChanged(int state)
stateChanged
in class org.apache.felix.ipojo.handlers.dependency.DependencyHandler
public String getApplicationId(org.osgi.framework.BundleContext context)
public void addApplication(Application app)
ApplicationTracker
addApplication
in interface ApplicationTracker
app
- an applicationpublic void removeApplication(Application app)
ApplicationTracker
removeApplication
in interface ApplicationTracker
app
- an applicationpublic void deploymentPackageAdded(Application app, String symbolicName)
deploymentPackageAdded
in interface ApplicationTracker
public void deploymentPackageRemoved(Application app, String symbolicName)
deploymentPackageRemoved
in interface ApplicationTracker
public void bundleAdded(Application app, String symbolicName)
bundleAdded
in interface ApplicationTracker
public void bundleRemoved(Application app, String symbolicName)
bundleRemoved
in interface ApplicationTracker
Copyright © 2012-2013 ADELE Research Group. All Rights Reserved.