Interface SimpleMessageConnector

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

    public interface SimpleMessageConnector
    extends MessageConnector<SimpleMessage>

    This interface is an extension point to implement message retrieval from different source to the iAGENT system. Implementations of the type SimpleMessageConnector have to provide the externally retrieved messages as objects of the type SimpleMessage

    • Method Detail

      • iterator

        MessageIterator<SimpleMessage> iterator()
        As long as the SimpleMessageConnector is running 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. Finally the MessageIterator.close() method will be called to indicate the end of the iteration and therefore also the end of the iterator's life cycle. All further mails, that haven't been processed yet, will be processed during the next fetch period.
        Specified by:
        iterator in interface java.lang.Iterable<SimpleMessage>
        Specified by:
        iterator in interface MessageConnector<SimpleMessage>
        a MessageIterator that allows to iterate the new mails waiting on the external source