org.granite.messaging.service
Class DefaultMethodMatcher
java.lang.Object
org.granite.messaging.service.DefaultMethodMatcher
- All Implemented Interfaces:
- MethodMatcher
public class DefaultMethodMatcher
- extends Object
- implements MethodMatcher
- Author:
- Franck WOLFF, Pedro GONCALVES
|
Method Summary |
protected Object[] |
convert(Converter[] convertersArray,
Object[] values,
Type[] targetTypes)
|
protected boolean |
findAndChange(Type[] paramTypes,
Type superType)
If there is only one TypeVariable in method's argument list, it will be replaced
by the type of the superclass of the service. |
ServiceInvocationContext |
findServiceMethod(Message message,
Destination destination,
Object service,
String methodName,
Object[] params)
|
protected Converter[] |
getConvertersArray(Converters converters,
Object[] values,
Type[] targetTypes)
|
protected Type |
getGenericType(Class<?> clazz)
Returns actual type argument of a given class. |
protected Method |
resolveMatchingMethod(List<Method> methods)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultMethodMatcher
public DefaultMethodMatcher()
findServiceMethod
public ServiceInvocationContext findServiceMethod(Message message,
Destination destination,
Object service,
String methodName,
Object[] params)
throws NoSuchMethodException
- Specified by:
findServiceMethod in interface MethodMatcher
- Throws:
NoSuchMethodException
getConvertersArray
protected Converter[] getConvertersArray(Converters converters,
Object[] values,
Type[] targetTypes)
convert
protected Object[] convert(Converter[] convertersArray,
Object[] values,
Type[] targetTypes)
resolveMatchingMethod
protected Method resolveMatchingMethod(List<Method> methods)
findAndChange
protected boolean findAndChange(Type[] paramTypes,
Type superType)
- If there is only one TypeVariable in method's argument list, it will be replaced
by the type of the superclass of the service.
getGenericType
protected Type getGenericType(Class<?> clazz)
- Returns actual type argument of a given class.