HttpSession httpSession = request.getSession();
if (httpSession == null)
throw new GuacamoleSecurityException("Cannot connect - user not logged in.");
// Get listeners
final SessionListenerCollection listeners;
try {
listeners = new SessionListenerCollection(httpSession);
}
catch (GuacamoleException e) {
logger.error("Creation of tunnel to guacd aborted: Failed to retrieve listeners: {}", e.getMessage());
logger.debug("Error retrieving listeners.", e);
throw e;