Applies action to all RouterStubs that are connected
@param action
193572
public void forEach(Consumer<RouterStub> action) {
        stubs.stream().filter(RouterStub::isConnected).forEach(action::accept);
    }
652335
function action(route) {

    if(!route){
        throw new Error('Please pass an action');
    }

    return ({ constructor }, method, { value }) => {

        let Class = constructor;

        initCoreMap(storage, Class);
        initActionMap(storage, Class);

        let map = storage.get(Class);

        map.get('@action').get('events').push([
            `${method} ${route}`, value
        ]);

        /**
         * ### Ensure "registerCallback('created', ..." (see below) registered only once ###
         * This function will called every time if an event registered e.g. @on('click .foo')
         * but registerOnCreatedCallback can only call once because we want only Create
         * one Eventhandler
         */
        if(map.get('@action').get('callbacksDefined')){
            return;
        }

        map.get('@callbacks').get('created').push(domNode => {

            let events = map.get('@action').get('events');
            domNode.$router = Router.create({
                routes : events,
                scope  : domNode,
                bind   : domNode,
            });
        });

        map.get('@callbacks').get('attached').push(domNode => {

            if(domNode.$router.initialized()){
                return;
            }

            let events = map.get('@action').get('events');
            let config = Router.makeConfig({
                routes : events,
                scope  : domNode,
                bind   : domNode,
            });

            /**
             * Using the same instance is 30% faster in
             * (Chrome, Opera) and no difference in Firefox
             * @see: https://jsperf.com/new-class-vs-singleton
             */
            domNode.$router.reinit(config);

        });

        map.get('@callbacks').get('detached').push(domNode => {
            domNode.$router.destroy();
        });

        map.get('@action').set('callbacksDefined', true);
    }
}
748841
protected function processAction(DOMNode $action)
    {
        $actionName = substr($action->nodeName, strlen($action->lookupPrefix(self::NS)) + 1);
        $methodName = 'action' . $actionName;
        if (method_exists($this, $methodName))
        {
            $this->$methodName($action);
        }
    }
731647
public function patch(string $uri, string $controller, string $action)
    {
        $this->addRoute('PATCH', $uri, $controller, $action);
    }
511655
public void forEach(@NotNull IntConsumer action) {
        while(iterator.hasNext()) {
            action.accept(iterator.nextInt());
        }
    }
1212245
private void doAction(List<ActionBlock> actions) throws ActionException {
        try {
            actions.get(nextStep).execute();
        } catch (ActionException e) {
            throw e;
        } catch (Exception e) {
            throw new ActionException("Exception raised by step: " + nextStep, e);
        }
    }
782040
function saveRouteToTheList(parsedUrl, action) {
                // used to add options routes later
                if (typeof allRoutesList[parsedUrl.url] === 'undefined') {
                    allRoutesList[parsedUrl.url] = [];
                }
                allRoutesList[parsedUrl.url].push(action);
            }
275784
public void foreachPartition(final Action1<PartitionState> action) {
    int len = partitionStates.length();
    for (int i = 0; i < len; i++) {
      PartitionState ps = partitionStates.get(i);
      if (ps == null) {
        continue;
      }
      action.call(ps);
    }
  }
1250250
protected function registerRoute($method, $uri, $action = null)
    {
        if (! is_array($action)) {
            $action = array_merge($this->attributes, $action ? ['uses' => $action] : []);
        }

        return $this->router->{$method}($uri, $this->compileAction($action));
    }
242524
public function addRoute($method, $uri, $action)
    {
        $action = $this->parseAction($action);

        $attributes = null;

        if ($this->hasGroupStack()) {
            $attributes = $this->mergeWithLastGroup([]);
        }

        if (isset($attributes) && \is_array($attributes)) {
            if (isset($attributes['prefix'])) {
                $uri = \trim($attributes['prefix'], '/').'/'.\trim($uri, '/');
            }

            if (isset($attributes['suffix'])) {
                $uri = \trim($uri, '/').\rtrim($attributes['suffix'], '/');
            }

            $action = $this->mergeGroupAttributes($action, $attributes);
        }

        $uri = '/'.\trim($uri, '/');

        if (isset($action['as'])) {
            $this->namedRoutes[$action['as']] = $uri;
        }

        if (\is_array($method)) {
            foreach ($method as $verb) {
                $this->routes[$verb.$uri] = ['method' => $verb, 'uri' => $uri, 'action' => $action];
            }
        } else {
            $this->routes[$method.$uri] = ['method' => $method, 'uri' => $uri, 'action' => $action];
        }
    }
314726
@Override
    public void setAction(final Runnable action) {
        super.setAction(new Runnable() {
            @Override
            public void run() {
                if (!isRunning) {
                    thread = new Thread(wrappedAction(action), "wunderboss-daemon-thread[" + name + "]");
                    thread.start();
                    isRunning = true;
                }
            }
        });
    }
930149
public function getActionRoute($action = null)
    {
        if (null === $action) {
            $action = $this->getEvent()
                ->getRouteMatch()
                ->getParam('action');
        }

        return $this->getRouteName().'/'.$action;
    }
253705
public CamelControlBusActionBuilder route(String id, String action) {
        super.action.setRouteId(id);
        super.action.setAction(action);
        return this;
    }
1363924
@SuppressWarnings({"ConstantConditions","deprecation"})
    @SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
    public void addAction(@Nonnull Action a) {
        if(a==null) {
            throw new IllegalArgumentException("Action must be non-null");
        }
        getActions().add(a);
    }
944527
function linkListeners(action)
                            {
                              if(post[action.type]) post[action.type].apply(post,action.args);
                            }
645998
public void forEach(Consumer<? super T> action) {
        connections.values().forEach(sync -> sync.doWithConnection(action));
    }
335245
public void setActions(java.util.Collection<DatasetAction> actions) {
        if (actions == null) {
            this.actions = null;
            return;
        }

        this.actions = new java.util.ArrayList<DatasetAction>(actions);
    }