Class HttpBlueMindMailboxTransport

java.lang.Object
org.exoplatform.bluemind.mail.service.HttpBlueMindMailboxTransport
All Implemented Interfaces:
BlueMindMailboxTransport

@Component @ConditionalOnClass(org.exoplatform.emailConnector.service.rules.ServerRuleEngine.class) public class HttpBlueMindMailboxTransport extends Object implements BlueMindMailboxTransport
The mail engines' transport: BlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>) with the account's source, and the job run on the session's own mailbox through BlueMindMailboxClient and BlueMindMailboxSharingClient. It adds nothing to the client's rules — one login door, one session cache for the whole add-on, one renewal on refusal, the key never handed out — and it is the only place the mail side reaches the client.

A @Component, not a @Service: the Kernel/Spring bridge exports @Service beans to every other web application, and a door to BlueMind is the add-on's own. Guarded by the mail host's engine SPI, since nothing but the add-on's engines uses it.

  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpBlueMindMailboxTransport(org.exoplatform.bluemind.client.BlueMindRestClient restClient, org.exoplatform.bluemind.client.BlueMindMailboxClient mailboxClient, org.exoplatform.bluemind.client.BlueMindMailboxSharingClient sharingClient)
    The transport over the add-on's client.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    call(org.exoplatform.bluemind.client.BlueMindAccountSource source, Function<BlueMindMailbox,T> job)
    Runs one job inside a session opened as the source's account.

    Methods inherited from class java.lang.Object

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

    • HttpBlueMindMailboxTransport

      public HttpBlueMindMailboxTransport(org.exoplatform.bluemind.client.BlueMindRestClient restClient, org.exoplatform.bluemind.client.BlueMindMailboxClient mailboxClient, org.exoplatform.bluemind.client.BlueMindMailboxSharingClient sharingClient)
      The transport over the add-on's client.
      Parameters:
      restClient - the add-on's REST client
      mailboxClient - the client's mailbox calls
      sharingClient - the client's sharing calls
  • Method Details

    • call

      public <T> T call(org.exoplatform.bluemind.client.BlueMindAccountSource source, Function<BlueMindMailbox,T> job)
      Runs one job inside a session opened as the source's account.
      Specified by:
      call in interface BlueMindMailboxTransport
      Type Parameters:
      T - what the job produces
      Parameters:
      source - the account's server and credentials, and who its session may be kept for
      job - the calls to make on the account's own mailbox
      Returns:
      what the job produced