Class MailboxConnector

    • Constructor Detail

      • MailboxConnector

        public MailboxConnector()
        Constructor for the MailboxConnector object
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object aObj)
                        throws java.lang.Exception
        Reads connector parameter's values and initialize the Connector.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class Connector
        Parameters:
        aObj - Null, Socket or ConnectorMode class
        Throws:
        java.lang.Exception - If invalid Connector parameter values are supplied.
      • getStore

        public javax.mail.Store getStore()
        Returns the Store object used by the Connector.
        Returns:
        the Store object this Connector is working with.
      • messagesAdded

        public void messagesAdded​(javax.mail.event.MessageCountEvent aMce)
        Gets notification for added message
        Specified by:
        messagesAdded in interface javax.mail.event.MessageCountListener
        Parameters:
        aMce - MessageCountEvent
      • messagesRemoved

        public void messagesRemoved​(javax.mail.event.MessageCountEvent aMce)
        Gets notification for removed message
        Specified by:
        messagesRemoved in interface javax.mail.event.MessageCountListener
        Parameters:
        aMce - MessageCountEvent
      • findEntry

        public Entry findEntry​(SearchCriteria aSearch)
                        throws java.lang.Exception
        Finds an existing entry. The search criteria specifies which entry to locate
        Specified by:
        findEntry in interface ConnectorInterface
        Overrides:
        findEntry in class Connector
        Parameters:
        aSearch - The search criteria used to locate the entry to be modified, search criteria can be /mail.messagenumber, mail.from, mail.to, mail.cc, mail.subject, mail.messageid
        Returns:
        The entry found, or null if no or multiple entries found
        Throws:
        java.lang.Exception - Any exceptions thrown by the connector's underlying classes
      • deleteEntry

        public void deleteEntry​(Entry aEntry,
                                SearchCriteria aSearch)
                         throws java.lang.Exception
        Deletes an existing entry. The search criteria specifies which entry to modify.
        Specified by:
        deleteEntry in interface ConnectorInterface
        Overrides:
        deleteEntry in class Connector
        Parameters:
        aEntry - The entry data
        aSearch - The search criteria used to locate the entry to be deleted
        Throws:
        java.lang.Exception - Any exceptions thrown by the connector's underlying classes
      • terminate

        public void terminate()
                       throws java.lang.Exception
        Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active.
        Specified by:
        terminate in interface ConnectorInterface
        Overrides:
        terminate in class Connector
        Throws:
        java.lang.Exception - if an error occurs.
      • putEntry

        public void putEntry​(Entry entry)
                      throws java.lang.Exception
        Adds a new entry to the data source
        Specified by:
        putEntry in interface ConnectorInterface
        Overrides:
        putEntry in class Connector
        Parameters:
        entry - The entry data to add
        Throws:
        java.lang.Exception - Any exceptions thrown when trying to add entry in update mode or when the appending of the message fails.
      • modEntry

        public void modEntry​(Entry entry,
                             SearchCriteria search,
                             Entry old)
                      throws java.lang.Exception
        Modifies an existing entry. The new entry data is given by the entry parameter and the search criteria specifies which entry to modify.
        Specified by:
        modEntry in interface ConnectorInterface
        Overrides:
        modEntry in class Connector
        Parameters:
        entry - The entry data
        search - The search criteria used to locate the entry to be modified
        old - The old entry found by the search criteria
        Throws:
        java.lang.Exception - Any exceptions thrown when updating the flags of a message
      • getVersion

        public java.lang.String getVersion()
        Version information.
        Specified by:
        getVersion in interface VersionInfoInterface
        Returns:
        the version information