Run a message through all the currently registered filters.
321168
public String filter (String msg, Name otherUser, boolean outgoing)
    {
        _filterMessageOp.setMessage(msg, otherUser, outgoing);
        _filters.apply(_filterMessageOp);
        return _filterMessageOp.getMessage();
    }
72675
def do_filter(self, arg):
        """"""
        if arg == "list":
            msg.info("TEST CASE FILTERS")
            for f in self.curargs["tfilter"]:
                if f == "*":
                    msg.info("  * (default, matches all)")
                else:
                    msg.info("  " + f)
        elif arg not in self.curargs["tfilter"]:
            self.curargs["tfilter"].append(arg)
            self.do_filter("list")
142668
def incoming(message)
      (m = filter(message, :incoming)) && each {|l| l.incoming(m)}
    end
782795
public Iterator<BaseMessageFilter> getFilterList(BaseMessageHeader messageHeader)
    {
        if (messageHeader == null)
            return super.getFilterList(messageHeader);  // ALL The filters
        return this.getRegistry().getFilterList(messageHeader);
    }
407679
function(topic, message) {
    /*
     * so should a filter manage the last message it has?  and give it an ID and store it... 
     * to prevent duplicates...
     * or should this filter do it...
     * this shold just execute 1 filter -- NO more than 1.  But if a topic matches
     * multiple filters then we need to call one filter and mark it dirty or something
     *
     * maybe save the lastMessage w/ a timestamp and if it matches, then skip it... 
     *
     * given topic A that matches 2 filters so there will be 2 messages... 
     *
     *
     * return number of matches...
     * 
     *
     */

    for( var key in myFilters) {
      if (myFilters.hasOwnProperty(key)) {
        myFilters[key].doFilter(topic,message) ;
      }
    }
    // count is how many times filter ran... 
  }
827821
def filter(self):
        '''
        
        '''

        if self.deprecated_filtering_enabled():
            print('warning: event filtering in sensu-plugin is deprecated,' +
                  'see http://bit.ly/sensu-plugin')
            self.filter_disabled()
            self.filter_silenced()
            self.filter_dependencies()

            if self.deprecated_occurrence_filtering():
                print('warning: occurrence filtering in sensu-plugin is' +
                      'deprecated, see http://bit.ly/sensu-plugin')
                self.filter_repeated()
147673
def for_all_targets(self, module, func, filter_func=None):
        """"""

        for target in self.targets(module):
            if filter_func is None or filter_func(target):
                func(target)
1072237
async def execute_filter(filter_: FilterObj, args):
    
    if filter_.is_async:
        return await filter_.filter(*args, **filter_.kwargs)
    else:
        return filter_.filter(*args, **filter_.kwargs)
508269
private void start()
    {
    try
      {
      // Initialize filter.
      initializeFilter( getFilterInput(), getFilterOutput());

      // Start filter thread.
      failure_ = null;
      thread_ = new Thread( this, String.valueOf( this));
      thread_.start();
      }
    catch( Exception e)
      {
      throw new RuntimeException( "Can't start filtering", e);
      } 
    }
1101622
private function registerFilters()
    {
        $filters = config('app.render_filters', []);

        foreach ($filters as $filter) {
            $filter = app($filter);

            if ($filter instanceof FilterContract) {
                $this->twigEnvironment->addFilter(new \Twig_SimpleFilter($filter->getName(), $filter->getFilter()));
                $this->twigStringEnvironment->addFilter(new \Twig_SimpleFilter($filter->getName(),
                    $filter->getFilter()));
            }
        }
    }
447212
public OrMessageFilter add(IFeedbackMessageFilter... filters) {
		for (IFeedbackMessageFilter filter : filters) {
			this.filters.add(filter);
		}
		return this;
	}
470918
public void registerProcessForMessage(BaseMessageFilter messageFilter, String strProcessClass, Map<String,Object> properties)
    {
        new TrxMessageListener(messageFilter, (Application)this.getTask().getApplication(), strProcessClass, properties);   // This listener was added to the filter
        ((MessageInfoApplication)this.getTask().getApplication()).getThickMessageManager().addMessageFilter(messageFilter);
        // Note: No need to worry about cleanup... Freeing the message manager will free all these listeners.
        if (properties != null)
            if (properties.get(MessageInfoApplication.AUTOSTART) != null)
                ((MessageInfoApplication)this.getTask().getApplication()).getThickMessageManager().sendMessage(new MapMessage(new BaseMessageHeader(messageFilter.getQueueName(), messageFilter.getQueueType(), this, null), properties));
    }
505766
def filter(self, record):
        """"""
        if isinstance(record.msg, basestring):
            message = record.msg.lower()
            if all(kw in message for kw in self.KEYWORDS):
                record.levelname = 'DEBUG'
                record.levelno = logging.DEBUG
        return 1
1195815
public void filterActiveWindow() {
    WindowFilter.Builder filterBuilder = WindowFilter.newBuilder();
    filterBuilder.setClearFilter(true);
    filterBuilder.addIncludeIDList(getActiveWindowId());

    executeMessage(WindowManagerMessage.MODIFY_FILTER, filterBuilder);
  }
1319283
def push_filters(self, new_filters):
        
        t = self.tokenizer
        for f in new_filters:
            t = f(t)
        self.tokenizer = t
97658
def apply_filters_to_scope(scope, user_params, options)
      helper_instance = fresh_helper_instance

      requested_filters = extract_filters(user_params, options)
      requested_filters.each do |filter_name, filter_arg|
        filter_lambda = configuration[:filters][filter_name][:value]

        args_for_filter_lambda = [filter_arg]
        args_for_filter_lambda << requested_filters if configuration[:filters][filter_name][:include_params]

        if filter_lambda
          scope = helper_instance.instance_exec(scope, *args_for_filter_lambda, &filter_lambda)
        else
          scope = scope.send(filter_name, *args_for_filter_lambda)
        end
      end

      scope
    end
248327
public void addListenerMessageFilter(BaseMessageFilter messageFilter)
    {
        if (m_messageFilterList == null)
            m_messageFilterList = new MessageListenerFilterList(this);
        m_messageFilterList.addMessageFilter(messageFilter);
    }