|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdist1.acb.common.HandlersHive
Class for resolving input type of object and calling appropriate handler (method) for the input object of this type
| Constructor Summary | |
HandlersHive(java.lang.Class handlersOwnerClass,
java.lang.Class[] handlersParamTypes,
java.lang.String name)
Creates a new instance of HandlersHive |
|
| Method Summary | |
void |
addHandler(java.lang.String requestType,
java.lang.String handlerName)
Add new handler to the hive. |
java.lang.Object |
handle(java.lang.Object obj,
java.lang.Object handlersOwner)
Resolves input type of the object and calls appropriate handler (method) for the input object of this type |
java.lang.Object |
handle(java.lang.Object obj,
java.lang.Object handlersOwner,
java.lang.Object[] handlersParams)
Resolves input type of the object and calls appropriate handler (method) for specifed parameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HandlersHive(java.lang.Class handlersOwnerClass,
java.lang.Class[] handlersParamTypes,
java.lang.String name)
handlersOwnerClass - The owner of handlers (methods) which will be
invokedhandlersParamTypes - Types of handler's parametersname - Name of the HandlersHive| Method Detail |
public void addHandler(java.lang.String requestType,
java.lang.String handlerName)
throws java.lang.NoSuchMethodException,
java.lang.SecurityException,
java.lang.ClassNotFoundException,
java.lang.NullPointerException
requestType - Handled typehandlerName - Name of the method (handler)
java.lang.NoSuchMethodException - if a matching method is not found or if
the name is "init"or "clinit".
java.lang.SecurityException - if access to the information is denied.
java.lang.ClassNotFoundException - if the class cannot be located.
java.lang.NullPointerException - if handlerName is null
public java.lang.Object handle(java.lang.Object obj,
java.lang.Object handlersOwner)
throws NoHandlerException,
java.lang.IllegalAccessException,
java.lang.IllegalArgumentException,
java.lang.reflect.InvocationTargetException,
java.lang.NullPointerException,
java.lang.ExceptionInInitializerError
obj - The input object to handlehandlersOwner - Class which owns the handlers
NoHandlerException - If the handler of the type was not found
java.lang.IllegalAccessException - if this Method object enforces Java
language access control and the underlying method is
inaccessible.
java.lang.IllegalArgumentException - if the method is an instance method and
the specified object argument is not an instance of the class
or interface declaring the underlying method (or of a subclass
or implementor thereof); if the number of actual and formal
parameters differ; if an unwrapping conversion for primitive
arguments fails; or if, after possible unwrapping, a parameter
value cannot be converted to the corresponding formal parameter
type by a method invocation conversion.
java.lang.reflect.InvocationTargetException - if the underlying method throws an
exception.
java.lang.NullPointerException - if the specified object is null and the
method is an instance method.
java.lang.ExceptionInInitializerError - if the initialization provoked by
this method fails.
public java.lang.Object handle(java.lang.Object obj,
java.lang.Object handlersOwner,
java.lang.Object[] handlersParams)
throws NoHandlerException,
java.lang.IllegalAccessException,
java.lang.IllegalArgumentException,
java.lang.reflect.InvocationTargetException,
java.lang.NullPointerException,
java.lang.ExceptionInInitializerError
obj - The input object to handlehandlersOwner - Class which owns the handlershandlersParams - Parameters for the handler
NoHandlerException - If the handler of the type was not found
java.lang.IllegalAccessException - if this Method object enforces Java
language access control and the underlying method is
inaccessible.
java.lang.IllegalArgumentException - if the method is an instance method and
the specified object argument is not an instance of the class
or interface declaring the underlying method (or of a subclass
or implementor thereof); if the number of actual and formal
parameters differ; if an unwrapping conversion for primitive
arguments fails; or if, after possible unwrapping, a parameter
value cannot be converted to the corresponding formal parameter
type by a method invocation conversion.
java.lang.reflect.InvocationTargetException - if the underlying method throws an
exception.
java.lang.NullPointerException - if the specified object is null and the
method is an instance method.
java.lang.ExceptionInInitializerError - if the initialization provoked by
this method fails.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||