public class ControllerHandler extends PrimitiveHandler
HANDLER_TYPE
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid
Constructor and Description |
---|
ControllerHandler() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.felix.ipojo.metadata.Element metadata,
java.util.Dictionary configuration)
Configure method.
|
void |
initializeComponentFactory(ComponentTypeDescription desc,
org.apache.felix.ipojo.metadata.Element metadata)
Initialize the component factory.
|
java.lang.Object |
onGet(java.lang.Object pojo,
java.lang.String field,
java.lang.Object value)
GetterCallback.
|
void |
onSet(java.lang.Object pojo,
java.lang.String field,
java.lang.Object value)
SetterCallback.
|
void |
start()
Start method.
|
void |
stop()
Stop method.
|
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onCreation, onEntry, onError, onExit, onFinally, setFactory
debug, error, error, getDescription, getHandlerManager, getValidity, info, isValid, reconfigure, setValidity, stateChanged, warn, warn
public void configure(org.apache.felix.ipojo.metadata.Element metadata, java.util.Dictionary configuration) throws ConfigurationException
configure
in class Handler
metadata
- : metadataconfiguration
- : configurationConfigurationException
- : the field attribute is missing or does not exist in the class.Handler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
public void start()
start
in class Handler
Handler.start()
public void stop()
stop
in class Handler
Handler.stop()
public java.lang.Object onGet(java.lang.Object pojo, java.lang.String field, java.lang.Object value)
onGet
in interface FieldInterceptor
onGet
in class PrimitiveHandler
pojo
- : the pojo object on which the field is accessed
Return the stored value.field
- : field name.value
- : value given by the previous handler.FieldInterceptor.onGet(Object, String, Object)
public void onSet(java.lang.Object pojo, java.lang.String field, java.lang.Object value)
onSet
in interface FieldInterceptor
onSet
in class PrimitiveHandler
pojo
- : the pojo object on which the field is accessed
Store the new field value & invalidate / validate the handler is required.field
- : field name.value
- : new value.FieldInterceptor.onSet(Object, String, Object)
public void initializeComponentFactory(ComponentTypeDescription desc, org.apache.felix.ipojo.metadata.Element metadata) throws ConfigurationException
initializeComponentFactory
in class Handler
desc
- : component descriptionmetadata
- : component type metadataConfigurationException
- : occurs if the controller field is not in the POJO class or is not a boolean.Handler.initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentTypeDescription, org.apache.felix.ipojo.metadata.Element)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.