Handle registered service expired event.

@param event the event
964083
@EventListener
    public void handleRegisteredServiceExpiredEvent(final CasRegisteredServiceExpiredEvent event) {
        val registeredService = event.getRegisteredService();
        val contacts = registeredService.getContacts();

        val mail = casProperties.getServiceRegistry().getMail();
        val sms = casProperties.getServiceRegistry().getSms();

        val serviceName = StringUtils.defaultIfBlank(registeredService.getName(), registeredService.getServiceId());
        if (communicationsManager.isMailSenderDefined()) {
            val message = mail.getFormattedBody(serviceName);
            contacts
                .stream()
                .filter(c -> StringUtils.isNotBlank(c.getEmail()))
                .forEach(c -> communicationsManager.email(mail, c.getEmail(), message));
        }
        if (communicationsManager.isSmsSenderDefined()) {
            val message = String.format(sms.getText(), serviceName);
            contacts
                .stream()
                .filter(c -> StringUtils.isNotBlank(c.getPhone()))
                .forEach(c -> communicationsManager.sms(sms.getFrom(), c.getPhone(), message));
        }

        servicesManager.load();
    }
1372976
public void postEvent (DEvent event)
    {
        if (!_running) {
            log.warning("Posting message to inactive object manager", "event", event,
                        new Exception());
        }

        // assign the event's id and append it to the queue
        event.eventId = getNextEventId(true);
        _evqueue.append(event);
    }
276225
public void postEvent (DEvent event)
    {
        if (_tevent != null) {
            _tevent.postEvent(event);

        } else if (_omgr != null) {
            _omgr.postEvent(event);

        } else {
            log.info("Dropping event for non- or no longer managed object", "oid", getOid(),
                     "class", getClass().getName(), "event", event);
        }
    }
466034
@UiHandler("m_dateModifiedEndDateBox")
    protected void onDateModifiedEndChange(ValueChangeEvent<Date> event) {

        if (event.getValue() != null) {
            m_tabHandler.setDateModifiedEnd(event.getValue().getTime());
        } else {
            // if the field is empty take the max value
            m_tabHandler.setDateModifiedEnd(-1L);
        }
    }
1071575
def on_expiration(self, session, expired_session_exception=None,
                      session_key=None):
        
        if (expired_session_exception and session_key):
            try:
                self.on_change(session)
                msg = "Session with id [{0}] has expired.".\
                    format(session.session_id)
                logger.debug(msg)

                identifiers = session.get_internal_attribute('identifiers_session_key')

                mysession = session_tuple(identifiers, session_key.session_id)

                self.notify_event(mysession, 'SESSION.EXPIRE')
            except:
                raise
            finally:
                self.after_expired(session)
        elif not expired_session_exception and not session_key:
            self.on_change(session)

        # Yosai adds this exception handling
        else:
            msg = "on_exception takes either 1 argument or 3 arguments"
            raise ValueError(msg)
1115790
def expired(self):
        """"""
        self._data["_killed"] = True
        self.save()
        raise SessionExpired(self._config.expired_message)
630264
def handle_expired_task(exception)
      exception.run_time = Time.now.in_time_zone(@task.time_zone)
      exception.scheduled_time = @scheduled_time
      exception.task = @task

      SimpleScheduler.expired_task_blocks.each do |block|
        block.call(exception)
      end
    end
54137
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.JOB_STARTED) {
      this.value = this.value + 1;
    } else if (event.getType() == EventType.JOB_FINISHED) {
      this.value = this.value - 1;
    }
  }
1299952
@EventHandler
    public void handle(ComponentAvailabilityChangedToOperativeEvent event) {
        updateComponentAvailability(event.getChargingStationId(), event.getComponentId(), event.getComponent(), Availability.OPERATIVE);
    }
174986
@Override
    public synchronized void dispatch(@NonNull Event event) {
        String type = event.type;
        List<EventHandlerWrapper> eventHandlers = subscribers.get(type);
        if (eventHandlers != null) {
            EventHandlerWrapper handler = null;
            for (int i = 0, size = eventHandlers.size(); i < size; i++) {
                handler = eventHandlers.get(i);
                if (handler.eventHandlerReceiver != null) {
                    handler.handleEvent(event);
                } else {
                    if (!TextUtils.isEmpty(handler.producer) && handler.producer.equals(event.sourceId)
                            || TextUtils.isEmpty(handler.producer)) {
                        handler.handleEvent(event);
                    }
                }
            }
        }
    }
528005
@EventListener
    public void handleApplicationReadyEvent(final ApplicationReadyEvent event) {
        AsciiArtUtils.printAsciiArtInfo(LOGGER, "READY", StringUtils.EMPTY);
        LOGGER.info("Ready to process requests @ [{}]", DateTimeUtils.zonedDateTimeOf(event.getTimestamp()));
    }
628299
@Override
    public void handleEvent(Event event) {
        String topic = event.getTopic();
        if (topic.equalsIgnoreCase(ChannelFramework.EVENT_STOPCHAIN.getName())) {
            String chainName = event.getProperty(ChannelFramework.EVENT_CHAINNAME, String.class);
            if (null != chainName) {
                stopChain(chainName, event);
            } else {
                String channelName = event.getProperty(ChannelFramework.EVENT_CHANNELNAME, String.class);
                if (null != channelName) {
                    stopChannel(channelName, event);
                }
            }
        } else if (topic.equalsIgnoreCase(EVENT_CHECK_MISSING.getName())) {
            ChannelUtils.checkMissingConfig();
        }
    }
1016095
public void trigger(Object event){

        Set<Class> eventTypes = getAllInheritedClasses(event.getClass());

        for (Class eventType : eventTypes) {
            if(observers.containsKey(eventType)){
                for (EventObserver eventObserver : observers.get(eventType)) {
                    executionQueue.get().add(new EventExecution(event, eventObserver));
                }
            }
        }

        triggerQueue();
    }
333363
function handleFailedEvent(event) {
        var data = getData(event);
        viewerAPI.fire('realtimeerror', { error: data });
        realtime.destroy();
    }
608830
@Override
    public void handleServerEvent(ISFSEvent event) throws SFSException {
        User sfsUser = (User)event.getParameter(SFSEventParam.USER);
        ApiUser apiUser = (ApiUser) sfsUser.getProperty(APIKey.USER);
        if(apiUser.getBuddyProperties() != null) 
            updateBuddyProperties(sfsUser.getBuddyProperties(), 
                    apiUser.getBuddyProperties());
        removeAddedBuddies(sfsUser);
        super.handleServerEvent(event);
    }
1336723
@EventListener
    public void handleRegisteredServicesLoadedEvent(final CasRegisteredServicesLoadedEvent event) {
        event.getServices()
            .stream()
            .filter(OidcRegisteredService.class::isInstance)
            .forEach(s -> {
                LOGGER.trace("Attempting to reconcile scopes and attributes for service [{}] of type [{}]",
                    s.getServiceId(), s.getClass().getSimpleName());
                this.scopeToAttributesFilter.reconcile(s);
            });
    }
582118
@EventHandler
    public void handle(ChargingStationOpeningTimesAddedEvent event) {
        LOG.info("ChargingStationOpeningTimesAddedEvent");

        ChargingStation chargingStation = getChargingStation(event.getChargingStationId());
        if (chargingStation != null) {
            if (chargingStation.getOpeningTimes() == null) {
                chargingStation.setOpeningTimes(new HashSet<io.motown.vas.viewmodel.persistence.entities.OpeningTime>());
            }
            chargingStation.getOpeningTimes().addAll(convertFromApiOpeningTimes(event.getOpeningTimes()));
            chargingStationRepository.createOrUpdate(chargingStation);
        }
    }