if (invocation instanceof ServerRpcMethodInvocation) {
try {
ServerRpcManager.applyInvocation(connector,
(ServerRpcMethodInvocation) invocation);
} catch (RpcInvocationException e) {
manager.handleConnectorRelatedException(connector, e);
}
} else {
// All code below is for legacy variable changes
LegacyChangeVariablesInvocation legacyInvocation = (LegacyChangeVariablesInvocation) invocation;