Class BlueMindClientConfiguration
java.lang.Object
org.exoplatform.bluemind.configuration.BlueMindClientConfiguration
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.exoplatform.bluemind.client.BlueMindMailboxClientThe mailbox calls the mail engines make on a session of the client above.org.exoplatform.bluemind.client.BlueMindMailboxSharingClientThe mailbox-sharing calls the sharing engine makes on a session of the client above.org.exoplatform.bluemind.client.BlueMindRestClientblueMindRestClient(org.exoplatform.bluemind.client.BlueMindSessionCache blueMindSessionCache) The REST client, on the default transport and timeouts: it never follows a redirect.org.exoplatform.bluemind.client.BlueMindSessionCacheblueMindSessionCache(int ttlSeconds, int maxAccounts) The sessions kept per account, on this node.static booleankeeps(int ttlSeconds, int maxAccounts) Whether bounds keep anything at all: a lifetime and room are both needed.
-
Field Details
-
TTL_PROPERTY
How long a kept session is reused, in seconds; zero keeps nothing.- See Also:
-
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 keptmaxAccounts- 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 lifetimemaxAccounts- the room- Returns:
- true when sessions are kept
-