Adds the given message to the list of messages that must be
        acknowledged and dispatches control to different ``_handle_*``
        method based on its type.
776168
async def _process_message(self, message):
        
        self._pending_ack.add(message.msg_id)
        handler = self._handlers.get(message.obj.CONSTRUCTOR_ID,
                                     self._handle_update)
        await handler(message)
512022
def add_message(message)
      @messages.key?(message.name) and raise SpecificationError,
        "A message named #{message.name} was already defined in #@protocol"
      @messages[message.name] = message
    end
839256
def add_message(request, level, message, extra_tags='', fail_silently=False, *args, **kwargs):
    
    if hasattr(request, '_messages'):
        return request._messages.add(level, message, extra_tags, *args, **kwargs)
    if not fail_silently:
        raise MessageFailure('You cannot add messages without installing '
                             'django.contrib.messages.middleware.MessageMiddleware')
1026181
def _add_handler(cls, handler, fmt, level):
        
        handler.setFormatter(_get_formatter(fmt))
        if level:
            handler.setLevel(level)
        logging.root.addHandler(handler)
        cls.used_formats = ("%s %s" % (cls.used_formats or "", fmt)).strip()
        cls.handlers.append(handler)
199201
protected void addMessage(String message)
    {
        messages.add(message);
        messageCount++;
        if (messageCount > messagesQueueMax)
        {
            messages.remove();
            messageCount--;
        }
    }
613178
async def __handle_backend_message(self, message):
        
        message_handlers = {
            BackendNewJob: self.__handle_new_job,
            BackendKillJob: self.kill_job,
            Ping: self.__handle_ping
        }
        try:
            func = message_handlers[message.__class__]
        except:
            raise TypeError("Unknown message type %s" % message.__class__)
        self._create_safe_task(func(message))
1258669
@Override
    public void handleMessage(Message message) {

        handlersList = getHanderList(busType, flow);

        if (handlersList == null || handlersList.size() == 0) {

            return;
        }

        ArrayList<Handler> excutedHandlers = new ArrayList<Handler>();
        JAXRS20MessageContextImpl jaxrsMessageContext = new JAXRS20MessageContextImpl(message);
        jaxrsMessageContext.isServerSide = busType.equals(Type.SERVER);
        jaxrsMessageContext.isClientSide = busType.equals(Type.CLIENT);
        jaxrsMessageContext.setProperty(HandlerConstants.FLOW_TYPE, flow.toUpperCase());
        try {
            Iterator<Handler> it = handlersList.iterator();
            while (it.hasNext()) {
                Handler handler = it.next();
                handler.handleMessage(jaxrsMessageContext);
                excutedHandlers.add(handler);
            }
        } catch (Exception e) {
            for (int i = excutedHandlers.size() - 1; i >= 0; i--) {
                excutedHandlers.get(i).handleFault(jaxrsMessageContext);
            }
        }
    }
679976
def handle_message(self, msg):
        
        # log messages received so that no one else has to
        if self._logger.isEnabledFor(logging.DEBUG):
            self._logger.debug(
                "received from {}: {}"
                .format(self.bind_address_string, repr(str(msg))))

        if msg.mtype == Message.INFORM:
            return self.handle_inform(msg)
        elif msg.mtype == Message.REPLY:
            return self.handle_reply(msg)
        elif msg.mtype == Message.REQUEST:
            return self.handle_request(msg)
        else:
            self._logger.error("Unexpected message type from server ['%s']."
                               % (msg,))
1126888
def send_message(self, message):
        
        for handler in self.users:
            logging.info('Handler: ' + str(handler))
            handler.write_message(message)
464287
def push(self, message, callback_arg=None):
        

        if message['action'] == 'upsert':
            message.setdefault('key_names', self.key_names)

        message['client_id'] = self.client_id
        message.setdefault('table_name', self.table_name)

        self._add_message(message, callback_arg)

        batch = self._take_batch(self.target_messages_per_batch)
        if batch:
            self._send_batch(batch)
671829
def add_hook(payload_class, hook_arg = nil, &hook_block)
      hook = block_given? ? hook_block : hook_arg
      if !hook || !hook.is_a?(Proc)
        raise "Must pass a proc either as an argument or a block"
      end
      @message_hooks[payload_class] << hook
    end
556023
function messageHandler( msg ) {
  switch (msg.type) {
    case 'load'   : return handleLoadMsg(msg);
    case 'search' : return handleSearch(msg);
    case 'lookupById': return handleLookupById(msg);
    default       : logger.error('Unknown message:', msg);
  }
}
608915
def _handle_presentation(self, msg):
        """"""
        ret_msg = handle_presentation(msg)
        if msg.child_id == 255 or ret_msg is None:
            return
        # this is a presentation of a child sensor
        topics = [
            '{}/{}/{}/{}/+/+'.format(
                self._in_prefix, str(msg.node_id), str(msg.child_id),
                msg_type)
            for msg_type in (int(self.const.MessageType.set),
                             int(self.const.MessageType.req))
        ]
        topics.append('{}/{}/+/{}/+/+'.format(
            self._in_prefix, str(msg.node_id),
            int(self.const.MessageType.stream)))
        self._handle_subscription(topics)
818326
function (message) {
        if (this.isEnabled(Level.LOG)) {
            console.log.apply(console, logArgs(Level.LOG, this.category, arguments));
        }
    }
340038
async def addSignalHandlers(self):
        '''
        
        '''

        def sigint():
            self.printf('<ctrl-c>')
            if self.cmdtask is not None:
                self.cmdtask.cancel()

        self.loop.add_signal_handler(signal.SIGINT, sigint)
658087
function add_admin_message( $message, $title = '', $type = 'success' ) {
            $this->_admin_notices->add( $message, $title, $type );
        }
834775
def handle_message(self, response, ignore_subscribe_messages=False):
        
        message_type = nativestr(response[0])
        if message_type == 'pmessage':
            message = {
                'type': message_type,
                'pattern': response[1],
                'channel': response[2],
                'data': response[3]
            }
        else:
            message = {
                'type': message_type,
                'pattern': None,
                'channel': response[1],
                'data': response[2]
            }

        # if this is an unsubscribe message, remove it from memory
        if message_type in self.UNSUBSCRIBE_MESSAGE_TYPES:
            subscribed_dict = None
            if message_type == 'punsubscribe':
                subscribed_dict = self.patterns
            else:
                subscribed_dict = self.channels
            try:
                del subscribed_dict[message['channel']]
            except KeyError:
                pass

        if message_type in self.PUBLISH_MESSAGE_TYPES:
            # if there's a message handler, invoke it
            handler = None
            if message_type == 'pmessage':
                handler = self.patterns.get(message['pattern'], None)
            else:
                handler = self.channels.get(message['channel'], None)
            if handler:
                handler(message)
                return None
        else:
            # this is a subscribe/unsubscribe message. ignore if we don't
            # want them
            if ignore_subscribe_messages or self.ignore_subscribe_messages:
                return None

        return message