Interface BlueMindMailboxTransport

All Known Implementing Classes:
HttpBlueMindMailboxTransport

public interface BlueMindMailboxTransport
The one port through which the mail engines talk to a BlueMind server's mailbox settings: one job run inside a REST session opened as the account a source names, over bluemind-client's own session handling.

What the port leaves to the client. The login, its retry on fresh material, the reuse of a kept session and its renewal when BlueMind refuses it, and the logout are BlueMindRestClient.call(org.exoplatform.bluemind.client.BlueMindAccountSource, java.util.function.Function<org.exoplatform.bluemind.client.BlueMindSession, T>)'s, and so is who a session is kept for: the source names it (BlueMindAccountSource.sessionKey()), never a key handed in beside it. The session key BlueMind answered never leaves the client: a job sees a BlueMindMailbox, which names who the session is and not what authenticates it.

What the port can never do. It offers no write of _filter (the whole MailFilter, rules included). The reply is written through _vacation and the forward through _forwarding, each call leaving the other settings as they are, and both address the login's own mailbox only. A server-rules engine that needs the rule calls adds them under its own review. The sharing calls are as narrow: the access-control list replaced is the login's own mailbox's, and the subscriptions edited are the login's own user's; no call edits another user's list or subscriptions.

The port is the engines' seam: the add-on's implementation is HttpBlueMindMailboxTransport, and the engines' tests drive an in-memory BlueMind through it.

  • 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.
  • Method Details

    • call

      <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.
      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
      Throws:
      UnsupportedOperationException - when the source produces no login and password
      org.exoplatform.bluemind.client.exception.BlueMindException - by kind, when the login or a call fails