Handle an event received from an adapter.
4382
async def handle_adapter_event(self, adapter_id, conn_string, conn_id, name, event):
        """"""

        if name == 'device_seen':
            self._track_device_seen(adapter_id, conn_string, event)
            event = self._translate_device_seen(adapter_id, conn_string, event)

            conn_string = self._translate_conn_string(adapter_id, conn_string)
        elif conn_id is not None and self._get_property(conn_id, 'translate'):
            conn_string = self._translate_conn_string(adapter_id, conn_string)
        else:
            conn_string = "adapter/%d/%s" % (adapter_id, conn_string)

        await self.notify_event(conn_string, name, event)
57492
def handle(self, event):
        
        callback = getattr(self, 'on_{event}'.format(event=event.event), None)
        callback(event)
431341
@Override
	public void handleEvent(String event, Map<ISFSEventParam, Object> params) {
		handleExtendedEvent(event, new SFSEvent(null, params));
	}
386361
def _event(self, event):
    """"""
    result = dict(
        pid=event.device_id,
        tid=event.resource_id,
        name=event.name,
        ts=event.timestamp_ps / 1000000.0)
    if event.duration_ps:
      result['ph'] = _TYPE_COMPLETE
      result['dur'] = event.duration_ps / 1000000.0
    else:
      result['ph'] = _TYPE_INSTANT
      result['s'] = _SCOPE_THREAD
    for key in dict(event.args):
      if 'args' not in result:
        result['args'] = {}
      result['args'][key] = event.args[key]
    return result
576686
def trigger_event(self, event, client, args, force_dispatch=False):
        """"""
        self.controller.process_event(event, client, args, force_dispatch=force_dispatch)
75316
def handleNotification(self, handle, data):
        """"""
        _LOGGER.debug("Got notification from %s: %s", handle, codecs.encode(data, 'hex'))
        if handle in self._callbacks:
            self._callbacks[handle](data)
648515
def _handle_event(self, sid, namespace, id, data):
        """"""
        namespace = namespace or '/'
        self.logger.info('received event "%s" from %s [%s]', data[0], sid,
                         namespace)
        if self.async_handlers:
            self.start_background_task(self._handle_event_internal, self, sid,
                                       data, namespace, id)
        else:
            self._handle_event_internal(self, sid, data, namespace, id)
1043246
def handle_event(self, event):
        """"""
        if event.get('command'):
            if event['command'] == 'on':
                cmd = 'off'
            else:
                cmd = 'on'

            task = self.send_command_ack(event['id'], cmd)
            self.loop.create_task(task)
808779
def _on_trace(_loop, adapter, conn_id, trace):
    """"""

    conn_string = adapter._get_property(conn_id, 'connection_string')
    if conn_string is None:
        adapter._logger.debug("Dropping trace data with unknown conn_id=%s", conn_id)
        return

    adapter.notify_event_nowait(conn_string, 'trace', trace)
1299952
@EventHandler
    public void handle(ComponentAvailabilityChangedToOperativeEvent event) {
        updateComponentAvailability(event.getChargingStationId(), event.getComponentId(), event.getComponent(), Availability.OPERATIVE);
    }
363559
def _connection_handler(self, event_name, data, channel_name):
        
        if channel_name in self.channels:
            self.channels[channel_name]._handle_event(event_name, data)
799193
def _on_prop_changed(self, instance, meth_name, res, args, kwargs):
        """"""
        Adapter._on_prop_changed(self)
302357
def handle_event(self, event):
        """"""
        string = '{id:<32} '
        if 'command' in event:
            string += '{command}'
        elif 'version' in event:
            if 'hardware' in event:
                string += '{hardware} {firmware} '
            string += 'V{version} R{revision}'
        else:
            string += '{value}'
            if event.get('unit'):
                string += ' {unit}'

        print(string.format(**event))
179651
protected void handlePostEvent()
    {
        EntityMetadata metadata = getEntityMetadata();
        if (!kunderaQuery.isDeleteUpdate())
        {
            persistenceDelegeator.getEventDispatcher().fireEventListeners(metadata, null, PostLoad.class);
        }
    }
319938
void fireExporterEvent(ExporterEvent evt) {
        Object[] listeners = listenerList.getListenerList();
        // Each listener occupies two elements - the first is the listener class
        // and the second is the listener instance
        for (int i = 0; i < listeners.length; i += 2) {
            if (listeners[i] == ExporterEventListener.class) {
                ((ExporterEventListener) listeners[i + 1]).notify(evt);
            }
        }
    }
704356
public void update(EventBean[] eventBeans, EventBean[] eventBeans1) {
        LOG.debug("Inbound channel adapter receiving an event from esper");

        Assert.notNull(channel);

        GenericMessage<EventBean[]> message = new GenericMessage<EventBean[]>(eventBeans);

        if (timeout != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Sending message (" + message + ") to channel " + channel + " with timeout " + timeout);
            }
            channel.send(message, timeout);
        } else {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Sending message (" + message + ") to channel " + channel);
            }
            channel.send(message);
        }

        LOG.debug("Inbound channel adapter received an event from esper");
    }
610890
async def handler(event):
    """"""
    await asyncio.wait([
        event.delete(),
        event.respond(READ_FULL, reply_to=event.reply_to_msg_id)
    ])