Class CaldavManagedLoginListener

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.services.listener.Listener<org.exoplatform.services.security.ConversationRegistry,org.exoplatform.services.security.ConversationState>
org.exoplatform.caldav.listener.CaldavManagedLoginListener
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, org.exoplatform.services.listener.ListenerBase<org.exoplatform.services.security.ConversationRegistry,org.exoplatform.services.security.ConversationState>

public class CaldavManagedLoginListener extends org.exoplatform.services.listener.Listener<org.exoplatform.services.security.ConversationRegistry,org.exoplatform.services.security.ConversationState>
Hands each login to the managed-mode enrolment (EXO-89653).

Bound to exo.core.security.ConversationRegistry.register in conf/portal/configuration.xml, the event the platform raises when a session gets its identity - at authentication, on a remembered session, or the first time an authenticated request reaches the portal filters - and only when the user holds no other registered session on this node (ConversationRegistry.register: getStateKeys(userId).isEmpty()). So at login, and again each time the platform registers the session anew: the registry keeps its states in caches that expire an hour after the registration (exo.cache.portal.ConversationRegistry.TimeToLive, 3600 by default), and the next request of a still-active session registers it again. A user who disconnects their calendar is therefore attached again within the hour, or at their next login - the same rule either way; a user the server refuses is retried at the same pace. Never per request. Nothing here needs to be cheap beyond "queue and return": the enrolment itself runs on the service's own executor, and this listener is deliberately not @Asynchronous - the kernel's asynchronous listener pool is one thread shared by every asynchronous listener of the platform, and a CalDAV server that does not answer must not hold it.

Glue only: the three rules live in CaldavManagedEnrollmentService.

  • Field Summary

    Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin

    desc, name
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEvent(org.exoplatform.services.listener.Event<org.exoplatform.services.security.ConversationRegistry,org.exoplatform.services.security.ConversationState> event)
     
    protected void
     

    Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin

    getDescription, getName, setDescription, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.exoplatform.services.listener.ListenerBase

    getName
  • Constructor Details

    • CaldavManagedLoginListener

      public CaldavManagedLoginListener()
  • Method Details

    • onEvent

      public void onEvent(org.exoplatform.services.listener.Event<org.exoplatform.services.security.ConversationRegistry,org.exoplatform.services.security.ConversationState> event)
    • setEnrollmentService

      protected void setEnrollmentService(CaldavManagedEnrollmentService enrollmentService)