Interface ExtendedMessageConnector

  • All Superinterfaces:
    java.lang.Iterable<ExtendedMessage>, MessageConnector<ExtendedMessage>

    public interface ExtendedMessageConnector
    extends MessageConnector<ExtendedMessage>

    This interface is an extension point to implement message retrieval from different sources to the iAGENT system. Implementations of the type ExtendedMessageConnector have to provide the externally retrieved messages as objects of the type ExtendedMessage A ExtendedMessage contains a Message and stores additional information about the retrieved message.

    Since:
    11.32
    • Method Detail

      • iterator

        MessageIterator<ExtendedMessage> iterator()
        As long as the ExtendedMessageConnector is active this method will be called periodically to retrieve messages from an external source. The MessageIterator may not be iterated until it's end. The MessageIterator has to implement the MessageIterator.remove() method, that will be called to remove a message permanently from the source after being processed successfully. A message that has been removed, must not be retrieved again by any MessageIterator in the future. Finally the MessageIterator.close() method will be called to indicate the end of the iteration and therefore the also the end of the iterator's life cycle. All further messages, that haven't been processed yet, will be processed during the next fetch period.
        Specified by:
        iterator in interface java.lang.Iterable<ExtendedMessage>
        Specified by:
        iterator in interface MessageConnector<ExtendedMessage>
        Returns:
        a MessageIterator that allows to iterate the new messages waiting on the external source
        Since:
        11.32