Registers an operation for the given method.
187865
private void registerMethod(Method method) {
    Type genericType = method.getGenericParameterTypes()[0];
    Class<?> argumentType = resolveArgument(genericType);
    if (argumentType != null && Operation.class.isAssignableFrom(argumentType)) {
      registerMethod(argumentType, method);
    }
  }
809803
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSInt cmd_index_validator = new MPSInt();
		cmd_index_validator.validate(operationType, cmd_index, "\"cmd_index\"");
		
		MPSString command_validator = new MPSString();
		command_validator.validate(operationType, command, "\"command\"");
		
	}
1372305
@Handler
    public void onNioRegistration(NioRegistration event)
            throws IOException {
        SelectableChannel channel = event.ioChannel();
        channel.configureBlocking(false);
        SelectionKey key;
        synchronized (selectorGate) {
            selector.wakeup(); // make sure selector isn't blocking
            key = channel.register(
                selector, event.ops(), event.handler());
        }
        event.setResult(new Registration(key));
    }
1184738
private void tryRegister(String className, String fromStringMethodName) throws ClassNotFoundException {
        Class<?> cls = loadType(className);
        registerMethods(cls, "toString", fromStringMethodName);
    }
188011
protected void registerStaticMethod(final String name, final Closure callable, final Class[] paramTypes) {
        performOperationOnMetaClass(new Callable() {
            public void call() {
                String methodName;
                if (name.equals(METHOD_MISSING))
                    methodName = STATIC_METHOD_MISSING;
                else if (name.equals(PROPERTY_MISSING))
                    methodName = STATIC_PROPERTY_MISSING;
                else
                    methodName = name;

                ClosureStaticMetaMethod metaMethod = null;

                if (paramTypes != null) {
                    metaMethod = new ClosureStaticMetaMethod(methodName, theClass, callable, paramTypes);
                } else {
                    metaMethod = new ClosureStaticMetaMethod(methodName, theClass, callable);
                }

                if (methodName.equals(INVOKE_METHOD_METHOD) && callable.getParameterTypes().length == 2) {
                    invokeStaticMethodMethod = metaMethod;
                } else {
                    if (methodName.equals(METHOD_MISSING)) {
                        methodName = STATIC_METHOD_MISSING;
                    }
                    MethodKey key = new DefaultCachedMethodKey(theClass, methodName, metaMethod.getParameterTypes(), false);

                    addMetaMethod(metaMethod);
                    dropStaticMethodCache(methodName);
//                    cacheStaticMethod(key,metaMethod);

                    if (isGetter(methodName, metaMethod.getParameterTypes())) {
                        String propertyName = getPropertyForGetter(methodName);
                        registerBeanPropertyForMethod(metaMethod, propertyName, true, true);

                    } else if (isSetter(methodName, metaMethod.getParameterTypes())) {
                        String propertyName = getPropertyForSetter(methodName);
                        registerBeanPropertyForMethod(metaMethod, propertyName, false, true);
                    }
                    performRegistryCallbacks();
                    expandoMethods.put(key, metaMethod);
                }
            }

        });
    }
2306
protected Operation httpOp(String method, HttpUrl url) {
        return new Operation(httpClient).method(method).httpUrl(url);
    }
328216
private void registerMethod(Class<?> type, Method method) {
    Class<?> returnType = method.getReturnType();
    if (returnType == void.class || returnType == Void.class) {
      registerVoidMethod(type, method);
    } else {
      registerValueMethod(type, method);
    }
  }
1142490
protected void registerAddOperation(final ManagementResourceRegistration registration, final AbstractAddStepHandler handler,
                                        OperationEntry.Flag... flags) {
        registration.registerOperationHandler(getOperationDefinition(ModelDescriptionConstants.ADD,
                new DefaultResourceAddDescriptionProvider(registration, descriptionResolver, orderedChild), OperationEntry.EntryType.PUBLIC, flags)
                , handler);
    }
73735
public void registerOperator(final String name, final Class<?> operatorSubclass) throws Exception
    {
        final String token = name.toLowerCase();
        if (operatorMap.containsKey(name))
            throw new Exception("duplicate operator: " + token);
        try
        {
            operatorMap.put(token, operatorSubclass.getConstructor(new Class<?>[] {
                    EquPart.class
            }));
        } catch (final Exception e)
        {
            throw new Exception("register operator: " + token, e);
        }
    }
266937
function (methodName, callback) {
    Mobile(methodName).registerToNative(callback);
    Mobile('didRegisterToNative').callNative(methodName, function () {
      logger.debug('Method %s registered to native', methodName);
    });
  }
1117850
def call_operation(self, operation, **kwargs):
        
        data = {'operation': operation}
        data.update(kwargs)
        return self.invoke(data)
1147969
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString response_validator = new MPSString();
		response_validator.validate(operationType, response, "\"response\"");
		
	}
647679
public void registerOperation(final ListenableFuture<?> future) {
    count.incrementAndGet();
    Futures.addCallback(future, new FutureCallback<Object>() {
      @Override
      public void onSuccess(Object result) {
        onOperationCompletion();
      }

      @Override
      public void onFailure(Throwable t) {
        onOperationCompletion();
      }
    }, MoreExecutors.directExecutor());
  }
1164338
def register(self, function):
        
        function = inspect.isclass(function) and function() or function
        name = function.name
        self[name] = function
154881
void registerPrefetchCall(@NotNull ApolloPrefetch apolloPrefetch) {
    checkNotNull(apolloPrefetch, "apolloPrefetch == null");
    OperationName operationName = apolloPrefetch.operation().name();
    registerCall(activePrefetchCalls, operationName, apolloPrefetch);
  }
713144
@Override
    public void registerInstanceMethod(String name, Closure closure) {
        expandableDelegate().registerInstanceMethod(name, closure);
    }
425445
void registerQueryCall(@NotNull ApolloQueryCall apolloQueryCall) {
    checkNotNull(apolloQueryCall, "apolloQueryCall == null");
    OperationName operationName = apolloQueryCall.operation().name();
    registerCall(activeQueryCalls, operationName, apolloQueryCall);
  }