if (isJAXWSAsyncClientMethod()) {
//pooling implementation
if (Response.class == returnType) {
if (!isDBC()) {
Type type = seiMethod.getGenericReturnType();
ParameterizedType pType = (ParameterizedType)type;
Type aType = pType.getActualTypeArguments()[0];
if (aType != null && ParameterizedType.class.isInstance(aType)) {
return (Class)((ParameterizedType)aType).getRawType();
}
return (Class)aType;
} else {
// FIXME: This doesn't work for DBC. That's OK for now because DBC isn't used on the client side
// yet; the client is all Java Reflection. On the Service side, the Async methods are not used.
// This needs to return T for Response<T>, or List for Response<List<T>>>
return returnType;
}
}
//Callback Implementation
else {
// FIXME: This doesn't work for DBC. That's OK for now because DBC isn't used on the client side
// yet; the client is all Java Reflection. On the Service side, the Async methods are not used.
// This needs to find and return T for AsyncHandler<T>, or List for AsyncHandler<List<T>>>
Type[] type = getGenericParameterTypes();
Class parameters[] = getParameterTypes();
int i = 0;
for (Class param : parameters) {
if (AsyncHandler.class.isAssignableFrom(param)) {
ParameterizedType pType = (ParameterizedType)type[i];
Type aType = pType.getActualTypeArguments()[0];
if (aType != null && ParameterizedType.class.isInstance(aType)) {
return (Class)((ParameterizedType)aType).getRawType();
}
return (Class)aType;
}