|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.Handler
org.apache.felix.ipojo.PrimitiveHandler
public abstract class PrimitiveHandler
Abstract class to extends for primitive handler.
Field Summary | |
---|---|
static java.lang.String |
HANDLER_TYPE
"Primitive" Handler type (value). |
Fields inherited from class org.apache.felix.ipojo.Handler |
---|
HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid |
Constructor Summary | |
---|---|
PrimitiveHandler()
|
Method Summary | |
---|---|
protected void |
attach(ComponentInstance manager)
Attach the current handler to the given instance. |
ComponentFactory |
getFactory()
|
Handler |
getHandler(java.lang.String name)
Get a plugged handler of the same container. |
InstanceManager |
getInstanceManager()
|
Logger |
getLogger()
Get the logger to use in the handler. |
org.apache.felix.ipojo.metadata.Element[] |
getMetadata()
|
PojoMetadata |
getPojoMetadata()
|
void |
onCreation(java.lang.Object instance)
This method is called when an instance of the component is created, but before someone can use it. |
void |
onEntry(java.lang.Object pojo,
java.lang.reflect.Method method,
java.lang.Object[] args)
This method is called when the execution enter in a method. |
void |
onError(java.lang.Object pojo,
java.lang.reflect.Method method,
java.lang.Throwable throwable)
This method is called when the execution throw an exception in the given method. |
void |
onExit(java.lang.Object pojo,
java.lang.reflect.Method method,
java.lang.Object returnedObj)
This method is called when the execution exit a method (before a return or a throw). |
void |
onFinally(java.lang.Object pojo,
java.lang.reflect.Method method)
This method is called when the execution of a method will terminate : just before to throw an exception or before to return. |
java.lang.Object |
onGet(java.lang.Object pojo,
java.lang.String fieldName,
java.lang.Object value)
This method is called when a GETFIELD operation is detected. |
void |
onSet(java.lang.Object pojo,
java.lang.String fieldName,
java.lang.Object value)
This method is called when a PUTFIELD operation is detected. |
void |
setFactory(Factory factory)
Set the factory attached to this handler object. |
Methods inherited from class org.apache.felix.ipojo.Handler |
---|
configure, error, error, getDescription, getHandlerManager, getValidity, info, initializeComponentFactory, isValid, reconfigure, setValidity, start, stateChanged, stop, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HANDLER_TYPE
Constructor Detail |
---|
public PrimitiveHandler()
Method Detail |
---|
protected final void attach(ComponentInstance manager)
attach
in class Handler
manager
- ! the instance on which the current handler will be attached.Handler.attach(org.apache.felix.ipojo.ComponentInstance)
public final void setFactory(Factory factory)
Handler
setFactory
in class Handler
factory
- : the factory.public Logger getLogger()
Handler
getLogger
in class Handler
public InstanceManager getInstanceManager()
public ComponentFactory getFactory()
public org.apache.felix.ipojo.metadata.Element[] getMetadata()
public PojoMetadata getPojoMetadata()
public final Handler getHandler(java.lang.String name)
getHandler
in class Handler
name
- : name of the handler to find (class name or qualified handler name (ns:name)).
public void onSet(java.lang.Object pojo, java.lang.String fieldName, java.lang.Object value)
onSet
in interface FieldInterceptor
pojo
- : the pojo object setting the valuefieldName
- : the field namevalue
- : the value passed to the fieldpublic java.lang.Object onGet(java.lang.Object pojo, java.lang.String fieldName, java.lang.Object value)
onGet
in interface FieldInterceptor
pojo
- : the pojo object getting the valuefieldName
- : the field namevalue
- : the value passed to the field (by the previous call)
public void onEntry(java.lang.Object pojo, java.lang.reflect.Method method, java.lang.Object[] args)
onEntry
in interface MethodInterceptor
pojo
- : pojo on which the method is called.method
- : method invoked.args
- arguments array.public void onExit(java.lang.Object pojo, java.lang.reflect.Method method, java.lang.Object returnedObj)
onExit
in interface MethodInterceptor
pojo
- : the pojo on which the method exits.method
- : exiting method.returnedObj
- : the returned object (boxed for primitive type)public void onError(java.lang.Object pojo, java.lang.reflect.Method method, java.lang.Throwable throwable)
onError
in interface MethodInterceptor
pojo
- : the pojo on which the method was accessed.method
- : invoked method.throwable
- : the thrown exceptionpublic void onFinally(java.lang.Object pojo, java.lang.reflect.Method method)
onFinally
in interface MethodInterceptor
pojo
- : the pojo on which the method was accessed.method
- : invoked method.public void onCreation(java.lang.Object instance)
instance
- : the created instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |