Object service = getServiceForRequest(payload);
RPCRequest rpcRequest = RPC.decodeRequest(payload, service.getClass(), this);
onAfterRequestDeserialized(rpcRequest);
//TODO: criar um ponto de injecao de comportamento aki.... para permitir que plugins sejam criados (ex: seguranca, logs, etc)
CruxSynchronizerTokenHandler handler = CruxSynchronizerTokenHandlerFactory.getCruxSynchronizerTokenHandler(getThreadLocalRequest());
boolean useToken = checkSynchonizerToken(rpcRequest, handler);
try
{
return RPC.invokeAndEncodeResponse(service, rpcRequest.getMethod(),
rpcRequest.getParameters(), rpcRequest.getSerializationPolicy());
}
finally
{
if (useToken)
{
String methodFullSignature = handler.getMethodDescription(rpcRequest.getMethod());
handler.endMethod(methodFullSignature);
}
}
}
catch (IncompatibleRemoteServiceException ex)
{