Interface MessengerProvider


@OverrideOnly public interface MessengerProvider
Represents a provider for Messenger instances.

Users wishing to provide their own implementation for the plugins "Messaging Service" should implement and register this interface.

See Also:
  • Method Details

    • getName

      @NonNull String getName()
      Gets the name of this provider.
      Returns:
      the provider name
    • obtain

      @NonNull Messenger obtain(@NonNull IncomingMessageConsumer incomingMessageConsumer)
      Creates and returns a new Messenger instance, which passes incoming messages to the provided IncomingMessageConsumer.

      As the agent should pass incoming messages to the given consumer, this method should always return a new object.

      Parameters:
      incomingMessageConsumer - the consumer the new instance should pass incoming messages to
      Returns:
      a new messenger agent instance