|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.ipojo.util.Callback
public class Callback
A callback allows calling a method on the component instances.
| Field Summary | |
|---|---|
protected java.lang.reflect.Method |
m_methodObj
Method object. |
| Constructor Summary | |
|---|---|
Callback(MethodMetadata method,
InstanceManager manager)
Constructor. |
|
Callback(java.lang.String method,
java.lang.Class[] args,
boolean isStatic,
InstanceManager manager)
Callback constructor. |
|
Callback(java.lang.String method,
java.lang.String[] args,
boolean isStatic,
InstanceManager manager)
Callback constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
call()
Call the method. |
java.lang.Object |
call(java.lang.Object instance)
Call the current callback method on the instance given in parameter. |
java.lang.Object |
call(java.lang.Object[] arg)
Call the callback on the method with the argument given in parameter. |
java.lang.Object |
call(java.lang.Object instance,
java.lang.Object[] arg)
Call the callback on the method with the argument given in parameter and with the arguments given in parameter too. |
java.lang.String |
getMethod()
|
protected void |
searchMethod()
Search the method object in the POJO by analyzing present method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.reflect.Method m_methodObj
| Constructor Detail |
|---|
public Callback(java.lang.String method,
java.lang.String[] args,
boolean isStatic,
InstanceManager manager)
method - : the name of the method to callargs - : argument type nameisStatic - : is the method a static methodmanager - : the instance manager of the component containing the method
public Callback(java.lang.String method,
java.lang.Class[] args,
boolean isStatic,
InstanceManager manager)
method - : the name of the method to callargs - : argument classesisStatic - : is the method a static methodmanager - : the instance manager of the component containing the method
public Callback(MethodMetadata method,
InstanceManager manager)
method - : Method Metadata obtain form manipulation metadata.manager - : instance manager.| Method Detail |
|---|
protected void searchMethod()
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException - : occurs when the method cannot be found either in the pojo class either in parent classes.
public java.lang.Object call()
throws java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException - : Method is not found in the class
java.lang.reflect.InvocationTargetException - : The method is not static
java.lang.IllegalAccessException - : The method can not be invoked
public java.lang.Object call(java.lang.Object instance)
throws java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
instance - : instance on which call the callback
java.lang.NoSuchMethodException - : the method was not found
java.lang.IllegalAccessException - : the method cannot be called
java.lang.reflect.InvocationTargetException - : an error happens in the method
public java.lang.Object call(java.lang.Object[] arg)
throws java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
arg - : the parameters
java.lang.NoSuchMethodException - : the callback method is not found
java.lang.IllegalAccessException - : the callback method cannot be called
java.lang.reflect.InvocationTargetException - : an error occurs inside the called method
public java.lang.Object call(java.lang.Object instance,
java.lang.Object[] arg)
throws java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
instance - : instance on which call the callbackarg - : the argument array
java.lang.NoSuchMethodException - : the callback method is not found
java.lang.IllegalAccessException - : the callback method cannot be called
java.lang.reflect.InvocationTargetException - : an error occurs inside the called methodpublic java.lang.String getMethod()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||