Get one or more receivers.

        :param receiver: Name of the signal
        :type receiver: str
        :param plugin: Plugin object, under which the signals where registered
        :type plugin: GwBasePattern
967357
def get_receiver(self, receiver=None, plugin=None):
        
        if plugin is not None:
            if receiver is None:
                receiver_list = {}
                for key in self.receivers.keys():
                    if self.receivers[key].plugin == plugin:
                        receiver_list[key] = self.receivers[key]
                return receiver_list
            else:
                if receiver in self.receivers.keys():
                    if self.receivers[receiver].plugin == plugin:
                        return self.receivers[receiver]
                    else:
                        return None
                else:
                    return None
        else:
            if receiver is None:
                return self.receivers
            else:
                if receiver in self.receivers.keys():
                    return self.receivers[receiver]
                else:
                    return None
202502
def proxy(self, signal_source, *signal_names, weak_ref=False):
		
		callback = self.__callback if weak_ref is False else self.__weak_ref_callback
		for signal_name in signal_names:
			signal_source.callback(signal_name, callback)
121015
private ClassSymbol getReceiver(ExpressionTree tree, Symbol sym) {
    if (sym.isStatic() || sym instanceof ClassSymbol) {
      return sym.enclClass();
    }
    switch (tree.getKind()) {
      case MEMBER_SELECT:
      case METHOD_INVOCATION:
        Type receiver = ASTHelpers.getType(ASTHelpers.getReceiver(tree));
        if (receiver == null) {
          return null;
        }
        return receiver.tsym.enclClass();
      case IDENTIFIER:
        // Simple names are implicitly qualified by an enclosing instance, so if we get here
        // we're inside the compilation unit that declares the receiver, and the diff doesn't
        // contain accurate information.
        return null;
      default:
        return null;
    }
  }
62812
def get_consumers(self, _Consumer, channel):
        
        return [_Consumer(queues=[self.queue(channel)], callbacks=[self.main_callback], prefetch_count=self.prefetch_count)]
105218
def emit(signal, *args, **kwargs):
    
    for callback in set(receivers[signal]):  # Make a copy in case of any ninja signals
        _call(callback, args=args, kwargs=kwargs)
234872
public Receiver registerReceiver(Receiver receiver) {
		synchronized (receivers) {
			if (!closed && (maxNrofReceivers == 0 || receivers.size() < maxNrofReceivers)) {
				receivers.add(receiver);
			}
			else {
				return null;
			}
			return receiver;
		}
	}
231842
protected void assignReceiverId (InvocationDecoder decoder)
    {
        Registration reg = new Registration(decoder.getReceiverCode(), nextReceiverId());
        // stick the mapping into the client object
        _clobj.addToReceivers(reg);
        // and map the receiver in our receivers table
        _receivers.put(reg.receiverId, decoder);
//         Log.info("Registered receiver " + StringUtil.shortClassName(decoder) + " " + reg + ".");
    }
554450
def bind(topic, signal=None, kind=MIDDLE, nice=-1):
    
    def f(func):
        if not topic in _receivers:
            receivers = _receivers[topic] = []
        else:
            receivers = _receivers[topic]
        
        if nice == -1:
            if kind == MIDDLE:
                n = 500
            elif kind == HIGH:
                n = 100
            else:
                n = 900
        else:
            n = nice
        if callable(func):
            func_name = func.__module__ + '.' + func.__name__
            func = func
        else:
            func_name = func
            func = None
        _f = (n, {'func':func, 'signal':signal, 'func_name':func_name})
        receivers.append(_f)
        return func
    return f
712122
def __builder_connect_pending_signals(self):
        """"""
        class _MultiHandlersProxy (object):
            def __init__(self, funcs): self.funcs = funcs
            def __call__(self, *args, **kwargs):
                # according to gtk documentation, the return value of
                # a signal is the return value of the last executed
                # handler
                for func in self.funcs:
                    res = func(*args, **kwargs)
                return res

        final_dict = {n: (v.pop() if len(v) == 1
                          else _MultiHandlersProxy(v))
                      for n, v in self.builder_pending_callbacks.items()}

        self._builder.connect_signals(final_dict)

        self.builder_connected = True
        self.builder_pending_callbacks = {}
707790
def get_plugins(cls, *args, **kwargs):
        
        return [plugin(*args, **kwargs) for plugin in cls.plugins]
281780
def get_signal_models(self):
        

        base = self.db.Model
        return [
            cls for cls in base._decl_class_registry.values() if (
                isinstance(cls, type)
                and issubclass(cls, base)
                and hasattr(cls, 'send_signalbus_message')
            )
        ]
790168
def _plugin_get(self, plugin_name):
        
        if not plugin_name:
            return None, u"Plugin name not set"
        for plugin in self.controller.plugins:
            if not isinstance(plugin, SettablePlugin):
                continue
            if plugin.name == plugin_name:
                return plugin, ""
        return None, u"Settable plugin '{}' not found".format(plugin_name)
279523
def __live_receivers(signal):
    
    with __lock:
        __purge()
        receivers = [funcref() for funcref in __receivers[signal]]

    return receivers
507815
async def receiver_handler(websocket):
    runner.addifnew(websocket)

    # The commented only works with python3-websockets 4.x
    '''
    
    '''

    while True:
        message = await websocket.recv()
        await consumer(websocket, message)
1243272
def connect(self, func):
        
        l = _alleged_receivers[id(self)]
        if func not in l:
            l.append(func)
335880
def plugin_request(plugin_str):
    '''
    
    '''
    from pip_helpers import CRE_PACKAGE

    match = CRE_PACKAGE.match(plugin_str)
    if not match:
        raise ValueError('Invalid plugin descriptor. Must be like "foo", '
                         '"foo==1.0", "foo>=1.0", etc.')
    return match.groupdict()
46929
public List getReceivers() {
		ArrayList result = new ArrayList();
		synchronized (attributes) {
			Iterator i = attributes.values().iterator();
			while (i.hasNext()) {
				Object o = i.next();
				if (o instanceof ReceiverQueue) {
					result.add(o);
				}
			}
		}
		return result;
	}