public class ProvidedServiceHandler extends PrimitiveHandler
HANDLER_TYPE
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid
Constructor and Description |
---|
ProvidedServiceHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addProperties(java.util.Dictionary dict)
Adds properties to all provided services.
|
void |
configure(org.apache.felix.ipojo.metadata.Element componentMetadata,
java.util.Dictionary configuration)
Configure the handler.
|
HandlerDescription |
getDescription()
Build the provided service description.
|
ProvidedService[] |
getProvidedServices()
Get the array of provided service.
|
void |
initializeComponentFactory(ComponentTypeDescription desc,
org.apache.felix.ipojo.metadata.Element metadata)
Initialize the component type.
|
java.lang.Object |
onGet(java.lang.Object pojo,
java.lang.String fieldName,
java.lang.Object value)
Getter Callback Method.
|
void |
onSet(java.lang.Object pojo,
java.lang.String fieldName,
java.lang.Object value)
Setter Callback Method.
|
void |
reconfigure(java.util.Dictionary dict)
Reconfigure provided service.
|
void |
removeProperties(java.util.Dictionary dict)
Remove properties form all provided services.
|
void |
start()
Start the provided service handler.
|
void |
stateChanged(int state)
Register the services if the new state is VALID.
|
void |
stop()
Stop the provided service handler.
|
attach, getConstructorParameter, getConstructorParameterType, getFactory, getHandler, getInstanceManager, getLogger, getPojoMetadata, onCreation, onEntry, onError, onExit, onFinally, setFactory
debug, error, error, getHandlerManager, getValidity, info, isValid, setValidity, warn, warn
public ProvidedService[] getProvidedServices()
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
- : the metadata are not correct.Handler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)
public void stop()
stop
in class Handler
Handler.stop()
public void start()
start
in class Handler
Handler.start()
public void onSet(java.lang.Object pojo, java.lang.String fieldName, java.lang.Object value)
onSet
in interface FieldInterceptor
onSet
in class PrimitiveHandler
pojo
- : the pojo object on which the field is accessedfieldName
- : field namevalue
- : new valueFieldInterceptor.onSet(Object, String, Object)
public java.lang.Object onGet(java.lang.Object pojo, java.lang.String fieldName, java.lang.Object value)
onGet
in interface FieldInterceptor
onGet
in class PrimitiveHandler
pojo
- : the pojo object on which the field is accessedfieldName
- : field namevalue
- : value pushed by the previous handlerFieldInterceptor.onGet(Object, String, Object)
public void stateChanged(int state)
stateChanged
in class Handler
state
- : the new instance state.Handler.stateChanged(int)
public void addProperties(java.util.Dictionary dict)
dict
- : dictionary of properties to addpublic void removeProperties(java.util.Dictionary dict)
dict
- : dictionary of properties to delete.public HandlerDescription getDescription()
getDescription
in class Handler
Handler.getDescription()
public void reconfigure(java.util.Dictionary dict)
reconfigure
in class Handler
dict
- : the new instance configuration.Handler.reconfigure(java.util.Dictionary)
public void initializeComponentFactory(ComponentTypeDescription desc, org.apache.felix.ipojo.metadata.Element metadata) throws ConfigurationException
initializeComponentFactory
in class Handler
desc
- : component type description to populate.metadata
- : component type metadata.ConfigurationException
- : occurs when the POJO does not implement any interfaces.Handler.initializeComponentFactory(org.apache.felix.ipojo.architecture.ComponentTypeDescription, org.apache.felix.ipojo.metadata.Element)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.