Interface AmLink

    • Method Detail

      • start

        Promise<Void,​Exception> start()
        Start the AmLink. The AmLink is considered ready for use only when the resulting promise has successfully completed. In case of a failed promise, the instance is considered as already closed.

        Note that notifications are guaranteed to be received AT LEAST once. Duplicate notification may occur.

        Returns:
        A promise of this AmLink's start completion.
      • close

        Promise<Void,​Exception> close()
        Close the AmLink and its associated resources. The instance can't be reused afterward.
        Returns:
        A promise indicating the AmLink has been closed
      • subscribe

        Promise<Void,​Exception> subscribe​(String topic)
        Subscribe to an AM topic. After successful subscription, the notification consumer (supplied in will begin receiving notifications on this topic.
        Parameters:
        topic - The AM topic to subscribe to.
        Returns:
        A promise of a successful subscription to the AM topic.
      • unsubscribe

        Promise<Void,​Exception> unsubscribe​(String topic)
        Unsubscribe from an AM topic. After successful unsubscribe request, the notification consumer will stop receiving notifications on this topic.
        Parameters:
        topic - The AM topic to un-subscribe from.
        Returns:
        A promise of a successful un-subscription to the AM topic.