Package org.jivesoftware.openfire.audit
Class SessionEvent
java.lang.Object
org.jivesoftware.openfire.audit.AuditEvent
org.jivesoftware.openfire.audit.SessionEvent
Events that occur during the session life cycle are repreented
by SessionEvents.
- Author:
- Iain Shigeoka
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
Session events use the code 1static final int
static final int
static final int
Fields inherited from class org.jivesoftware.openfire.audit.AuditEvent
USER_CODES
-
Method Summary
Modifier and TypeMethodDescriptionstatic SessionEvent
createAuthFailureEvent
(Session session, String user, String resource) Create an event associated with the failure of a session to authenticate.static SessionEvent
createAuthSuccessEvent
(Session session) Create an event associated with a successful authentication.static SessionEvent
createConnectEvent
(Session session) Create an event associated with the initial connection of a session before the stream is created.static SessionEvent
createDisconnectEvent
(Session session) Create an event associated with the closing of a session.static SessionEvent
createStreamEvent
(Session session) Create an event associated with the establishment of an XMPP session.Methods inherited from class org.jivesoftware.openfire.audit.AuditEvent
getCode, getData, getReason, getSession, getTimestamp, setCode, setData, setReason, setSession, setTimestamp
-
Field Details
-
SESSION_CODE
public static final int SESSION_CODESession events use the code 1- See Also:
-
SESSION_CONNECT
public static final int SESSION_CONNECT- See Also:
-
SESSION_STREAM
public static final int SESSION_STREAM- See Also:
-
SESSION_AUTH_FAILURE
public static final int SESSION_AUTH_FAILURE- See Also:
-
SESSION_AUTH_SUCCESS
public static final int SESSION_AUTH_SUCCESS- See Also:
-
SESSION_DISCONNECT
public static final int SESSION_DISCONNECT- See Also:
-
-
Method Details
-
createConnectEvent
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
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
Create an event associated with the failure of a session to authenticate.- Parameters:
session
- the session that made the attemptuser
- the user that made the attemptresource
- the resource used for the attempt- Returns:
- an event representing the connection event
-
createAuthSuccessEvent
Create an event associated with a successful authentication.- Parameters:
session
- the session that authenticated.- Returns:
- an event representing the connection event.
-
createDisconnectEvent
Create an event associated with the closing of a session.- Parameters:
session
- the session that was disconnected.- Returns:
- an event representing the connection event.
-