try {
RPCRequest rpcRequest = StreamServiceUtils.decodeRequest(payload,
this.getClass(), this);
//onAfterRequestDeserialized(rpcRequest);
StreamServiceIterator iterator = null;
try {
iterator = (StreamServiceIterator) rpcRequest.getMethod()
.invoke(this,
rpcRequest.getParameters());
try {
this.sendResults(rpcRequest.getMethod(), iterator,
rpcRequest.getSerializationPolicy());
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
if (iterator != null) {
iterator.close();
}
}
} catch (IllegalArgumentException ex) {
throw new IncompatibleRemoteServiceException("", ex);
} catch (InvocationTargetException ex) {