}
oos = new ObjectOutputStream(new BufferedOutputStream(socket
.getOutputStream()));
MethodRequest mr = (MethodRequest)ois.readObject();
MethodResponse mresp = null;
String objectId = mr.getObjectId();
if (StringUtils.isNotEmpty(objectId)) {
// do the dispatching
Object remote = remoteObjects.get(objectId);
if (remote != null) {
String methodName = mr.getMethodName();
if (StringUtils.isNotEmpty(methodName)) {
Object[] params = mr.getParams();
try {
// execute method and reply
Object retVal = MethodUtils.invokeMethod(
remote, methodName, params);