de.netseeker.ejoe.handler
Class DefaultRemotingHandler

java.lang.Object
  extended by de.netseeker.ejoe.handler.BaseRemotingHandler
      extended by de.netseeker.ejoe.handler.DefaultRemotingHandler
All Implemented Interfaces:
ClassRegistry, ServerHandler, java.io.Serializable

public class DefaultRemotingHandler
extends BaseRemotingHandler

Reflection based ServerHandler. This is the default implementation for EJOE's remote reflection feature. This class handles automatic mapping of object types to primitives for the method parameter to find the right method signature. Classes, parameter classes (including object-primitive-mapping) as well as methods will be cached to outperform usual reflection.

Since:
0.3.9.1
Author:
netseeker
See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.netseeker.ejoe.handler.BaseRemotingHandler
classCache
 
Constructor Summary
DefaultRemotingHandler()
           
 
Method Summary
protected  java.lang.Object[] getArgTypes(java.lang.Object[] params)
           
protected  java.lang.reflect.Constructor getConstructorForArgumentTypes(java.lang.Class clazz, java.lang.Class[] argTypes, java.lang.Class[] argTypesPrimitive)
          Similiar to getMethodForArgumentTypes(Class, String, Class[], Class[]) but tries to lookup constructors instead
protected  java.lang.reflect.Method getMethodForArgumentTypes(java.lang.Class clazz, java.lang.String mName, java.lang.Class[] argTypes, java.lang.Class[] argTypesPrimitive)
           
 
Methods inherited from class de.netseeker.ejoe.handler.BaseRemotingHandler
deRegisterClassMapping, getClassByName, getPrimitiveForWrapper, getWrapperForPrimitive, handle, registerClassMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRemotingHandler

public DefaultRemotingHandler()
Method Detail

getArgTypes

protected java.lang.Object[] getArgTypes(java.lang.Object[] params)
Parameters:
params - array of objects for which the argument types has to be determined
Returns:
an array of two class-arrays (Class[]) containing object types in the first class-array as well as their primitive representation in the second class-array

getConstructorForArgumentTypes

protected java.lang.reflect.Constructor getConstructorForArgumentTypes(java.lang.Class clazz,
                                                                       java.lang.Class[] argTypes,
                                                                       java.lang.Class[] argTypesPrimitive)
                                                                throws java.lang.SecurityException,
                                                                       java.lang.NoSuchMethodException
Similiar to getMethodForArgumentTypes(Class, String, Class[], Class[]) but tries to lookup constructors instead

Parameters:
clazz -
argTypes -
argTypesPrimitive -
Returns:
Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException

getMethodForArgumentTypes

protected java.lang.reflect.Method getMethodForArgumentTypes(java.lang.Class clazz,
                                                             java.lang.String mName,
                                                             java.lang.Class[] argTypes,
                                                             java.lang.Class[] argTypesPrimitive)
                                                      throws java.lang.SecurityException,
                                                             java.lang.NoSuchMethodException
Parameters:
clazz -
mName -
argTypes -
argTypesPrimitive -
Returns:
Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException


Copyright © 2005-2007 netseeker. All Rights Reserved.