public class DependencyHandler extends PrimitiveHandler implements DependencyStateListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DYNAMIC_PROXY
Proxy type value: dynamic-proxy.
|
static java.lang.String |
PROXY_DISABLED
Proxy settings value: disabled.
|
static java.lang.String |
PROXY_ENABLED
Proxy settings value: enabled.
|
static java.lang.String |
PROXY_SETTINGS_PROPERTY
Proxy settings property.
|
static java.lang.String |
PROXY_TYPE_PROPERTY
Proxy type property.
|
static java.lang.String |
SMART_PROXY
Proxy type value: smart.
|
HANDLER_TYPE
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid
Constructor and Description |
---|
DependencyHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkContext()
Check the validity of the dependencies.
|
void |
configure(org.apache.felix.ipojo.metadata.Element componentMetadata,
java.util.Dictionary configuration)
Configure the handler.
|
protected DependencyCallback |
createDependencyHandler(Dependency dep,
java.lang.String method,
int type) |
Dependency[] |
getDependencies()
Get the list of managed dependency.
|
static java.lang.String |
getDependencyIdentifier(Dependency dep)
Builds a description of this dependency to help the user to identify it.
|
HandlerDescription |
getDescription()
Get the dependency handler description.
|
void |
invalidate(DependencyModel dep)
Invalidate method.
|
void |
onCreation(java.lang.Object instance)
Handler createInstance method.
|
void |
reconfigure(java.util.Dictionary configuration)
The instance is reconfigured.
|
void |
start()
Handler start method.
|
void |
stateChanged(int state)
This method is called when the component state changed.
|
void |
stop()
Handler stop method.
|
void |
validate(DependencyModel dep)
Validate method.
|
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onEntry, onError, onExit, onFinally, onGet, onSet, setFactory
debug, error, error, getHandlerManager, getValidity, info, initializeComponentFactory, isValid, setValidity, warn, warn
public static final java.lang.String PROXY_SETTINGS_PROPERTY
public static final java.lang.String PROXY_TYPE_PROPERTY
public static final java.lang.String SMART_PROXY
public static final java.lang.String DYNAMIC_PROXY
public static final java.lang.String PROXY_ENABLED
public static final java.lang.String PROXY_DISABLED
public static java.lang.String getDependencyIdentifier(Dependency dep)
dep
- the dependencypublic Dependency[] getDependencies()
public void validate(DependencyModel dep)
validate
in interface DependencyStateListener
dep
- : the dependency becoming RESOLVED.DependencyStateListener.validate(org.apache.felix.ipojo.util.DependencyModel)
public void invalidate(DependencyModel dep)
invalidate
in interface DependencyStateListener
dep
- : the dependency becoming UNRESOLVED or BROKEN.DependencyStateListener.invalidate(org.apache.felix.ipojo.util.DependencyModel)
protected void checkContext()
public void configure(org.apache.felix.ipojo.metadata.Element componentMetadata, java.util.Dictionary configuration) throws ConfigurationException
configure
in class Handler
componentMetadata
- : the component type metadataconfiguration
- : the instance configurationConfigurationException
- : one dependency metadata is not correct.Handler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
protected DependencyCallback createDependencyHandler(Dependency dep, java.lang.String method, int type)
public void start()
start
in class Handler
Handler.start()
public void stop()
stop
in class Handler
Handler.stop()
public void onCreation(java.lang.Object instance)
onCreation
in class PrimitiveHandler
instance
- : the created objectPrimitiveHandler.onCreation(Object)
public HandlerDescription getDescription()
getDescription
in class Handler
Handler.getDescription()
public void reconfigure(java.util.Dictionary configuration)
reconfigure
in class Handler
configuration
- the new instance configuration.public void stateChanged(int state)
Handler
stateChanged
in class Handler
state
- the new instance state ComponentInstance
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.