Class SessionEvent


  • public class SessionEvent
    extends AuditEvent
    Events that occur during the session life cycle are repreented by SessionEvents.
    Author:
    Iain Shigeoka
    • Method Detail

      • createConnectEvent

        public static SessionEvent createConnectEvent​(Session session)
        Create an event associated with the initial connection of a session before the stream is created.
        Parameters:
        session - the session that was connected.
        Returns:
        an event representing the connection event.
      • createStreamEvent

        public static SessionEvent createStreamEvent​(Session session)
        Create an event associated with the establishment of an XMPP session. A connect event that is not followed by a stream event indicates the connection was rejected.
        Parameters:
        session - the session that began streaming.
        Returns:
        an event representing the connection event.
      • createAuthFailureEvent

        public static SessionEvent createAuthFailureEvent​(Session session,
                                                          String user,
                                                          String resource)
        Create an event associated with the failure of a session to authenticate.
        Parameters:
        session - the session that made the attempt
        user - the user that made the attempt
        resource - the resource used for the attempt
        Returns:
        an event representing the connection event
      • createAuthSuccessEvent

        public static SessionEvent createAuthSuccessEvent​(Session session)
        Create an event associated with a successful authentication.
        Parameters:
        session - the session that authenticated.
        Returns:
        an event representing the connection event.
      • createDisconnectEvent

        public static SessionEvent createDisconnectEvent​(Session session)
        Create an event associated with the closing of a session.
        Parameters:
        session - the session that was disconnected.
        Returns:
        an event representing the connection event.