Handles the HttpSessionEvent by publishing a {@link HttpSessionDestroyedEvent} to the
application appContext.

@param event The HttpSessionEvent pass in by the container
173317
public void sessionDestroyed(HttpSessionEvent event) {
    if (null != eventMulticaster) {
      eventMulticaster.multicast(new HttpSessionDestroyedEvent(event.getSession()));
    }
  }
1182663
public void valueUnbound(HttpSessionBindingEvent event) {
        for (SessionFieldMapper fieldMapper : this.values()) {
            if (fieldMapper.runnable != null) fieldMapper.runnable.cancel();
        }
    }
118097
private void handleClusterEvent(ClusterMembershipEvent event) {
    threadContext.execute(() -> {
      if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
        for (Session session : sessions.values()) {
          if (session.memberId().equals(event.subject().id())) {
            role.expire((PrimaryBackupSession) session);
          }
        }
      }
    });
  }
738154
public void onSearchRequested(SearchRequestEvent event) {
		final SearchEvent searchEvent = new SearchEvent();
		searchEvent.setCriterion(event.getCriterion());
		fireSearchStartEvent(searchEvent);
		SearchCommService.searchByCriterion(event.getCriterion(), mapWidget,
				new DataCallback<Map<VectorLayer, List<Feature>>>() {
					public void execute(Map<VectorLayer, List<Feature>> result) {
						searchEvent.setResult(result);
						fireSearchDoneEvent(searchEvent);
						fireSearchEndEvent(searchEvent);
					}
				}, new Runnable() {
					public void run() {
						fireSearchEndEvent(searchEvent);
						destroyWindow();
						SC.say(messages.searchControllerFailureMessage());
					}
				});
	}
431341
@Override
	public void handleEvent(String event, Map<ISFSEventParam, Object> params) {
		handleExtendedEvent(event, new SFSEvent(null, params));
	}
1029427
public void fireEvent(final Event<?> event)
    {
        Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
            @Override
            public void execute() {
                bus.fireEventFromSource(event, dialog.getInterfaceModel().getId());
            }
        });

    }
698840
@Override
    public void onApplicationEvent(final ProfileSelectionEvent event) {
        final HttpSession session = event.getRequest().getSession(false);

        Assert.notNull(session, "Cannot store a profile selection into a null session.");

        session.setAttribute(this.attributeName, event.getRequestedProfileKey());

        logger.trace(
                "Stored desired profile key [{}] into session (at attribute [{}]).",
                event.getRequestedProfileKey(),
                attributeName);

        final String fnameTheKeyMapsTo = this.mappings.get(event.getRequestedProfileKey());

        if (null == fnameTheKeyMapsTo) {
            logger.warn(
                    "The desired profile key {} has no mapping so will have no effect.",
                    event.getRequestedProfileKey());
        }
    }
458522
public void removeEventListener(EventListener listener)
    {
        if (listener instanceof HttpSessionAttributeListener)
            _sessionAttributeListeners.remove(listener);
        if (listener instanceof HttpSessionListener)
            _sessionListeners.remove(listener);
    }
538911
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.FLOW_FINISHED) {
      final FlowRunner runner = (FlowRunner) event.getRunner();
      if (runner != null && runner.getExecutableFlow().getStatus().equals(Status.FAILED)) {
        this.value = this.value + 1;
      }
    }
  }
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());
    }
  }
280130
@Override
    public void handleEvent(Event event) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Received event: " + event.getTopic());
        }
        // if (event.getTopic().equals(PURGE_EVENT)) {
        this.sessionMgr.startPurge();
        // }
    }
414923
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.JOB_FINISHED && Status.FAILED
        .equals(event.getData().getStatus())) {
      this.value = this.value + 1;
    }
  }
348289
@Disconnect
    public void onDisconnect(AtmosphereResourceEvent event) {
        if (event.isCancelled()) {
            // We didn't get notified, so we remove the user.
            users.values().remove(event.getResource().uuid());
            logger.info("Browser {} unexpectedly disconnected", event.getResource().uuid());
        } else if (event.isClosedByClient()) {
            logger.info("Browser {} closed the connection", event.getResource().uuid());
        }
    }
511754
public void handleEvent(SystemHookEvent event) throws GitLabApiException {
        if (event != null) {
            LOGGER.info("handleEvent:" + event.getClass().getSimpleName() + ", eventName=" + event.getEventName());
            fireEvent(event);
        } else {
            LOGGER.warning("handleEvent: provided event cannot be null!");
        }
    }
681146
@Override
  public boolean handleEvent(StateEvent event) throws InternalException, OverloadException {
    try {
      sendAndStateLock.lock();
      if (!super.session.isValid()) {
        // FIXME: throw new InternalException("Generic session is not valid.");
        return false;
      }
      final S6aSessionState state = this.sessionData.getS6aSessionState();
      S6aSessionState newState = null;
      Event localEvent = (Event) event;
      Event.Type eventType = (Type) event.getType();
      switch (state) {

        case IDLE:
          switch (eventType) {

            case RECEIVE_AIR:
              this.sessionData.setBuffer((Request) ((AppEvent) event.getData()).getMessage());
              super.cancelMsgTimer();
              super.startMsgTimer();
              newState = S6aSessionState.MESSAGE_SENT_RECEIVED;
              setState(newState);
              listener.doAuthenticationInformationRequestEvent(this, (JAuthenticationInformationRequest) event.getData());
              break;

            case RECEIVE_PUR:
              this.sessionData.setBuffer((Request) ((AppEvent) event.getData()).getMessage());
              super.cancelMsgTimer();
              super.startMsgTimer();
              newState = S6aSessionState.MESSAGE_SENT_RECEIVED;
              setState(newState);
              listener.doPurgeUERequestEvent(this, (JPurgeUERequest) event.getData());
              break;

            case RECEIVE_ULR:
              this.sessionData.setBuffer((Request) ((AppEvent) event.getData()).getMessage());
              super.cancelMsgTimer();
              super.startMsgTimer();
              newState = S6aSessionState.MESSAGE_SENT_RECEIVED;
              setState(newState);
              listener.doUpdateLocationRequestEvent(this, (JUpdateLocationRequest) event.getData());
              break;

            case RECEIVE_NOR:
              this.sessionData.setBuffer((Request) ((AppEvent) event.getData()).getMessage());
              super.cancelMsgTimer();
              super.startMsgTimer();
              newState = S6aSessionState.MESSAGE_SENT_RECEIVED;
              setState(newState);
              listener.doNotifyRequestEvent(this, (JNotifyRequest) event.getData());
              break;

            case SEND_MESSAGE:
              super.session.send(((AppEvent) event.getData()).getMessage(), this);
              newState = S6aSessionState.MESSAGE_SENT_RECEIVED;
              setState(newState);
              break;

            default:
              logger.error("Wrong action in S6a Server FSM. State: IDLE, Event Type: {}", eventType);
              break;
          }
          break;

        case MESSAGE_SENT_RECEIVED:
          switch (eventType) {
            case TIMEOUT_EXPIRES:
              newState = S6aSessionState.TIMEDOUT;
              setState(newState);
              break;

            case SEND_MESSAGE:
              try {
                super.session.send(((AppEvent) event.getData()).getMessage(), this);
              }
              finally {
                newState = S6aSessionState.TERMINATED;
                setState(newState);
              }
              break;

            case RECEIVE_CLA:
              try {
                super.cancelMsgTimer();
                listener.doCancelLocationAnswerEvent(this, (JCancelLocationRequest) localEvent.getRequest(), (JCancelLocationAnswer) localEvent.getAnswer());
              }
              finally {
                newState = S6aSessionState.TERMINATED;
                setState(newState);
              }
              break;

            case RECEIVE_IDA:
              try {
                super.cancelMsgTimer();
                listener.doInsertSubscriberDataAnswerEvent(this, (JInsertSubscriberDataRequest) localEvent.getRequest(),
                    (JInsertSubscriberDataAnswer) localEvent.getAnswer());
              }
              finally {
                newState = S6aSessionState.TERMINATED;
                setState(newState);
              }
              break;

            case RECEIVE_DSA:
              try {
                super.cancelMsgTimer();
                listener.doDeleteSubscriberDataAnswerEvent(this, (JDeleteSubscriberDataRequest) localEvent.getRequest(),
                    (JDeleteSubscriberDataAnswer) localEvent.getAnswer());
              }
              finally {
                newState = S6aSessionState.TERMINATED;
                setState(newState);
              }
              break;

            case RECEIVE_RSA:
              try {
                super.cancelMsgTimer();
                listener.doResetAnswerEvent(this, (JResetRequest) localEvent.getRequest(), (JResetAnswer) localEvent.getAnswer());
              }
              finally {
                newState = S6aSessionState.TERMINATED;
                setState(newState);
              }
              break;

            default:
              throw new InternalException("Should not receive more messages after initial. Command: " + event.getData());
          }
          break;

        case TERMINATED:
          throw new InternalException("Cant receive message in state TERMINATED. Command: " + event.getData());

        case TIMEDOUT:
          throw new InternalException("Cant receive message in state TIMEDOUT. Command: " + event.getData());

        default:
          logger.error("S6a Server FSM in wrong state: {}", state);
          break;
      }
    }
    catch (Exception e) {
      throw new InternalException(e);
    }
    finally {
      sendAndStateLock.unlock();
    }

    return true;
  }
342469
public void sendEvent(Event event) {
        for (ShouldSendEventCallback shouldSendEventCallback : shouldSendEventCallbacks) {
            if (!shouldSendEventCallback.shouldSend(event)) {
                logger.trace("Not sending Event because of ShouldSendEventCallback: {}", shouldSendEventCallback);
                return;
            }
        }

        try {
            connection.send(event);
        } catch (LockedDownException | TooManyRequestsException e) {
            logger.debug("Dropping an Event due to lockdown: " + event);
        } catch (Exception e) {
            logger.error("An exception occurred while sending the event to Sentry.", e);
        } finally {
            getContext().setLastEventId(event.getId());
        }
    }
668555
@Override
	public void servletEvent(final ServletEvent event) {
		if (LOG.isDebugEnabled()) {
			LOG.debug("Sending web event " + event + " for bundle "
					+ event.getBundleName());
		}
		synchronized (listeners) {
			callListeners(event);
			Map<String, ServletEvent> events = states.get(event.getBundleId());
			if (events == null) {
				events = new LinkedHashMap<>();
				states.put(event.getBundleId(), events);
			}
			events.put(event.getAlias(), event);
		}
	}