use of com.caucho.burlap.io.BurlapInput in project LinkAgent by shulieTech.
the class BurlapServletServiceInterceptor method getMethodArgs.
public Object[] getMethodArgs(InputStream is, BurlapSkeleton burlapSkeleton) {
try {
BurlapInput in = new BurlapInput(is);
HessianInputFactory.HeaderType header = _inputFactory.readHeader(is);
while ((in.readHeader()) != null) {
in.readObject();
}
String methodName = in.readMethod();
int argLength = in.readMethodArgLength();
Method method = null;
try {
Map map = Reflect.on(burlapSkeleton).get(HessianConstants.DYNAMIC_FIELD_METHOD_MAP);
method = (Method) map.get(methodName + "__" + argLength);
} catch (ReflectException e) {
}
if (method != null) {
} else if ("_hessian_getAttribute".equals(methodName)) {
String attrName = in.readString();
in.completeCall();
} else if (method == null) {
}
Class<?>[] args = method.getParameterTypes();
if (argLength != args.length && argLength >= 0) {
return null;
}
Object[] values = new Object[args.length];
for (int i = 0; i < args.length; i++) {
values[i] = in.readObject(args[i]);
}
in.completeCall();
return new Object[] { methodName, args };
} catch (IOException e) {
return EMPTY_ARGS;
}
}
Aggregations