Can't you make use of the invokeOperation(key, operation) method.