class StatelessOperations implements SessionOperations {

    @Override
    public void destroy(final Session requester, final Session session) throws SessionException {
        sessionService.checkPermissionToDestroySession(requester, session.getID());
        if (session instanceof StatelessSession) {
            SessionInfo sessionInfo = statelessSessionFactory.getSessionInfo(session.getID());
            sessionLogging.logEvent(sessionInfo, SessionEvent.DESTROY);
            // Required since not possible to mock SessionAuditor in test case
            if (sessionAuditor != null) {
                sessionAuditor.auditActivity(sessionInfo, AM_SESSION_DESTROYED);
            }
        }

        sessionBlacklist.blacklist(session);
    }

    @Inject public  StatelessOperations(final LocalOperations localOperations,
                               final SessionService sessionService,
                               final StatelessSessionFactory statelessSessionFactory,
                               final SessionBlacklist sessionBlacklist,
                               final SessionLogging sessionLogging,
                               final SessionAuditor sessionAuditor);

}