Class BlueMindSessionService

java.lang.Object
org.exoplatform.caldav.service.BlueMindSessionService

@Service public class BlueMindSessionService extends Object
Drops the BlueMind REST session an account holds when eXo itself changes what that account is (EXO-90397).

Why a service of its own. The sessions are kept by BlueMindSessionCache under the eXo login the credentials were produced for, because that is what a credentials provider resolves its target account from. The events that must drop one — a connection, a reconnection with new credentials, a disconnection — are raised by CaldavConnectorServiceImpl, which knows the user by their social identity and reaches its collaborators through the Kernel/Spring bridge. That bridge exports @Service beans and nothing else (KernelContainerLifecyclePlugin), so this class is one, as CaldavServerOwnerService and CaldavConnectionIdentityService are for the very same reason; and the identity-to-login translation lives here, in one place, rather than being repeated at each call site.

The same events EXO-90243 already hooks. Nothing new is raised: the two places that forget an account's recorded server identity are the two places that forget its session.

  • Constructor Details

    • BlueMindSessionService

      public BlueMindSessionService()
  • Method Details

    • forget

      public void forget(long userIdentityId, Long serverId)
      Drops and closes the session kept for one account.
      Parameters:
      userIdentityId - the social identity of the connected user
      serverId - the declared server the account was on; null for the legacy deployment property
    • forgetAll

      public void forgetAll()
      Drops every kept session, because the declared servers changed under them — a registration edited or deleted. The dropped sessions expire on BlueMind's own clock; what matters is that none of them is sent again under a registration that no longer says what it said.