public Instant getLastActivity() {
        synchronized (connectionQueue) {
            if (!connectionQueue.isEmpty()) {
                // The session is currently active, set the last activity to the current time.
                lastActivity = Instant.now();
            }
            return lastActivity;
        }
    }
Returns the time in milliseconds since the epoch that this session was last active. Activity
is a request was either made or responded to. If the session is currently active, meaning
there are connections awaiting a response, the current time is returned.

@return the time in milliseconds since the epoch that this session was last active.
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpSession.java