Process event. Just the first time.
497363
@Override
    public void processEvent(SystemEvent event) throws AbortProcessingException {
        final UIViewRoot source = (UIViewRoot) event.getSource();

        final FacesContext context = FacesContext.getCurrentInstance();
        final WebXmlParameters webXmlParameters = new WebXmlParameters(context.getExternalContext());
        final boolean provideJQuery = webXmlParameters.isProvideJQuery();
        final boolean provideBootstrap = webXmlParameters.isProvideBoostrap();
        final boolean useCompressedResources = webXmlParameters.isUseCompressedResources();
        final boolean disablePrimeFacesJQuery = webXmlParameters.isIntegrationPrimeFacesDisableJQuery();

        final List<UIComponent> resources = new ArrayList<>(source.getComponentResources(context, HEAD));
        // Production mode and compressed
        if (useCompressedResources && context.getApplication().getProjectStage() == ProjectStage.Production) {
            handleCompressedResources(context, provideJQuery, provideBootstrap, resources, source);
        } else {
            handleConfigurableResources(context, provideJQuery, provideBootstrap, resources, source);
        }

        if (disablePrimeFacesJQuery) {
            for (UIComponent resource : resources) {
                final String resourceLibrary = (String) resource.getAttributes().get("library");
                final String resourceName = (String) resource.getAttributes().get("name");
                if ("primefaces".equals(resourceLibrary) && "jquery/jquery.js".equals(resourceName)) {
                    source.removeComponentResource(context, resource);
                }
            }
        }
    }
295908
def process_event(event):
    
    if event.type == EventType.ON_CONVERSATION_TURN_STARTED:
        print()

    print(event)

    if (event.type == EventType.ON_CONVERSATION_TURN_FINISHED and
            event.args and not event.args['with_follow_on_turn']):
        print()
    if event.type == EventType.ON_DEVICE_ACTION:
        for command, params in event.actions:
            print('Do command', command, 'with params', str(params))
197538
protected void processEvent (DEvent event)
    {
        // look up the target object
        DObject target = _objects.get(event.getTargetOid());
        if (target == null) {
            log.debug("Event target no longer exists", "event", event);
            return;
        }

        // check the event's permissions
        if (!target.checkPermissions(event)) {
            log.warning("Event failed permissions check", "event", event, "target", target);
            return;
        }

        if (dispatchEvent(event, target)) {
            // unless requested not to, notify any proxies
            target.notifyProxies(event);
        }
    }
766115
def exec_event_handler(self, event, transactional=False):
        """"""
        # QUESTION: Should we raise an exception if `event` is not in some
        # known event-type list?

        callbacks = self._options.get('callbacks', {})

        handler = callbacks.get(event)

        if not handler:
            raise Exception('Handler not defined!!!')

        handler.start(transactional=transactional)
218182
def handle_event(self, packet):
        """"""
        if packet.get('command'):
            task = self.send_command_ack(packet['id'], packet['command'])
            self.loop.create_task(task)
202638
def start_processing_handler(self, event):
        """"""
        results_path = os.path.join(self.configuration['results_folder'],
                                    "filesystem.json")
        self.logger.debug("Event %s: start comparing %s with %s.",
                          event, self.checkpoints[0], self.checkpoints[1])

        results = compare_disks(self.checkpoints[0], self.checkpoints[1],
                                self.configuration)

        with open(results_path, 'w') as results_file:
            json.dump(results, results_file)

        self.processing_done.set()
673406
def trigger(self, event, *args):
        """"""
        for handler in self._event_handlers[event]:
            handler(*args)
189571
def process_once(self, timeout=0.01):
        
        try:
            event = self.recv(timeout)
            if event:
                event_t = event[0]
                event_c = event[1]

                if event_t == 'JOIN':
                    self.on_join(event_c[0], event_c[1])
                elif event_t == 'PART':
                    self.on_part(event_c[0], event_c[1], event_c[2])
                elif event_t == 'PRIVMSG':
                    if event_c[1] in self.channels.keys():
                        self.on_chanmsg(event_c[0], event_c[1], event_c[2])
                    else:
                        self.on_privmsg(event_c[0], event_c[2])
                elif event_t == 'NOTICE':
                    if event_c[1] in self.channels.keys():
                        self.on_channotice(event_c[0], event_c[1], event_c[2])
                    else:
                        self.on_privnotice(event_c[0], event_c[2])
                elif event_t == 'CTCP':
                    if event_c[1] in self.channels.keys():
                        self.on_chanctcp(event_c[0], event_c[1], event_c[2])
                    else:
                        self.on_privctcp(event_c[0], event_c[2])
                elif event_t == 'CTCP_REPLY':
                    self.on_ctcp_reply(event_c[0], event_c[2])
                elif event_t == 'MODE':
                    if event_c[0][0] == self.current_nick:
                        self.on_umode(event_c[1])
                    else:
                        self.on_cmode(event_c[0], event_c[1], event_c[2])
                elif event_t == 'KICK':
                    self.on_kick(event_c[0], event_c[1], event_c[2], \
                    event_c[3])
                elif event_t == 'INVITE':
                    self.on_invite(event_c[0], event_c[2])
                elif event_t == 'NICK':
                    self.on_nick(event_c[0], event_c[1])
                elif event_t == 'TOPIC':
                    self.on_topic(event_c[0], event_c[1], event_c[2])
                elif event_t == 'QUIT':
                    self.on_quit(event_c[0], event_c[1])
                elif event_t == 'LUSERS':
                    self.on_lusers(event_c)
                elif event_t == 'ERROR':
                    self.on_error(event_c[0])
                elif event_t == 'UNKNOWN':
                    self.on_unknown(event_c[0])

        except self.LurklibError as exception:
            self.on_exception(exception)
195039
public void processEvent(EventObject event) {
    if (event instanceof RequestEvent) {
      processRequest((RequestEvent) event);
    } else if (event instanceof ResponseEvent) {
      processResponse((ResponseEvent) event);
    } else if (event instanceof TimeoutEvent) {
      processTimeout((TimeoutEvent) event);
    } else {
      LOG.error("invalid event type received: {}: {}", event.getClass().getName(), event.toString());
    }
  }
257259
def handle_new_events(self, events):
        """"""
        for event in events:
            self.events.append(
                self.create_event_object(
                    event[0],
                    event[1],
                    int(event[2])))
600901
def process_request(self):
        """"""
        self.response = self.request_handler.process_request(
            self.method, self.request_data)
971339
def process_event(self, event, client, args, force_dispatch=False):
        
        if not self.running:
            _log.debug("Ignoring '%s' event - controller not running.", event)
            return

        # We keep a copy of the state of loaded modules before this event,
        # and restore it when we're done. This lets us handle events that
        # result in other events being dispatched in a graceful manner.
        old_loaded = self.loaded_on_this_event
        self.loaded_on_this_event = set(old_loaded or []) if not force_dispatch else set()

        try:
            _log.debug("Controller is dispatching '%s' event", event)
            for module_name in self.module_ordering:
                if module_name in self.loaded_on_this_event and not force_dispatch:
                    _log.debug("Not dispatching %s to '%s' because it was just "
                               "loaded (%r).", event, module_name,
                               self.loaded_on_this_event)
                    continue
                module = self.loaded_modules[module_name]
                if module.handle_event(event, client, args):
                    return True
        finally:
            self.loaded_on_this_event = old_loaded
334082
public void processEvent(EventObject event) // for asynchronous
  // (nonblocking) response
  // handling
  {
    synchronized (this) {
    } // wail til message sending has finished (transaction attribute set)

    if (event instanceof ResponseEvent) {
      processResponse((ResponseEvent) event);
    } else if (event instanceof TimeoutEvent) {
      processTimeout((TimeoutEvent) event);
    }

    // note, requests don't come through here, they are handled via the
    // listen/waitFor methods.
  }
991977
def start_processing_handler(self, event):
        """"""
        self.logger.debug("Event %s: starting Volatility process(es).", event)

        for snapshot in self.snapshots:
            self.process_snapshot(snapshot)

        self.processing_done.set()
431281
def run(self):
        '''
        
        '''
        salt.utils.process.appendproctitle(self.__class__.__name__)
        self.event = get_event('master', opts=self.opts, listen=True)
        events = self.event.iter_events(full=True)
        self.event.fire_event({}, 'salt/event_listen/start')
        try:
            for event in events:
                if event['tag'] == 'salt/event/exit':
                    self.stop = True
                if self._filter(event):
                    self.event_queue.append(event)
                if len(self.event_queue) >= self.event_return_queue:
                    self.flush_events()
                if self.stop:
                    break
        finally:  # flush all we have at this moment
            if self.event_queue:
                self.flush_events()
1112777
public function process()
    {
        if (!$this->isInitialized()) {
            $this->init();
        }

        if ($this->getFirstAncestor('SwatForm') !== null) {
            $this->getCompositeWidget('check_all')->process();
        }

        $this->processed = true;

        if ($this->tile !== null) {
            $this->tile->process();
        }
    }
649922
function emitEvent(emitter, event, data) {    
  process.nextTick(function() {
    emitter.emit(event, data);
  });
}