Class BlueMindClientConfiguration

java.lang.Object
org.exoplatform.bluemind.configuration.BlueMindClientConfiguration

@Configuration public class BlueMindClientConfiguration extends Object
The add-on's one BlueMind REST client, the one node-local cache of the sessions it keeps, and the mailbox calls made on those sessions: one login path for every contribution of the add-on, whatever host it contributes to.

Plain @Bean methods, deliberately: a bean defined by a factory method carries no bean class the Kernel/Spring bridge could read, so it is never exported to another web application — these are the add-on's own and nobody else's.

The cache's bounds keep the names the calendar host has always read them under, "exo.agenda.caldav.bluemind.session.ttlSeconds" and "exo.agenda.caldav.bluemind.session.maxAccounts", so that a deployment that tuned them keeps its values.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    How many accounts' sessions are kept at once; zero keeps nothing.
    static final String
    How long a kept session is reused, in seconds; zero keeps nothing.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.exoplatform.bluemind.client.BlueMindMailboxClient
    The mailbox calls the mail engines make on a session of the client above.
    org.exoplatform.bluemind.client.BlueMindMailboxSharingClient
    The mailbox-sharing calls the sharing engine makes on a session of the client above.
    org.exoplatform.bluemind.client.BlueMindRestClient
    blueMindRestClient(org.exoplatform.bluemind.client.BlueMindSessionCache blueMindSessionCache)
    The REST client, on the default transport and timeouts: it never follows a redirect.
    org.exoplatform.bluemind.client.BlueMindSessionCache
    blueMindSessionCache(int ttlSeconds, int maxAccounts)
    The sessions kept per account, on this node.
    static boolean
    keeps(int ttlSeconds, int maxAccounts)
    Whether bounds keep anything at all: a lifetime and room are both needed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TTL_PROPERTY

      public static final String TTL_PROPERTY
      How long a kept session is reused, in seconds; zero keeps nothing.
      See Also:
    • MAX_ACCOUNTS_PROPERTY

      public static final String MAX_ACCOUNTS_PROPERTY
      How many accounts' sessions are kept at once; zero keeps nothing.
      See Also:
  • Constructor Details

    • BlueMindClientConfiguration

      public BlueMindClientConfiguration()
  • Method Details

    • blueMindSessionCache

      @Bean public org.exoplatform.bluemind.client.BlueMindSessionCache blueMindSessionCache(@Value("${exo.agenda.caldav.bluemind.session.ttlSeconds:300}") int ttlSeconds, @Value("${exo.agenda.caldav.bluemind.session.maxAccounts:1000}") int maxAccounts)
      The sessions kept per account, on this node.
      Parameters:
      ttlSeconds - how long an entry is kept
      maxAccounts - how many accounts are kept at once
      Returns:
      the cache
    • blueMindRestClient

      @Bean public org.exoplatform.bluemind.client.BlueMindRestClient blueMindRestClient(org.exoplatform.bluemind.client.BlueMindSessionCache blueMindSessionCache)
      The REST client, on the default transport and timeouts: it never follows a redirect.
      Parameters:
      blueMindSessionCache - the sessions kept per account
      Returns:
      the client
    • blueMindMailboxClient

      @Bean public org.exoplatform.bluemind.client.BlueMindMailboxClient blueMindMailboxClient()
      The mailbox calls the mail engines make on a session of the client above.
      Returns:
      the mailbox calls
    • blueMindMailboxSharingClient

      @Bean public org.exoplatform.bluemind.client.BlueMindMailboxSharingClient blueMindMailboxSharingClient()
      The mailbox-sharing calls the sharing engine makes on a session of the client above.
      Returns:
      the sharing calls
    • keeps

      public static boolean keeps(int ttlSeconds, int maxAccounts)
      Whether bounds keep anything at all: a lifetime and room are both needed.
      Parameters:
      ttlSeconds - the lifetime
      maxAccounts - the room
      Returns:
      true when sessions are kept