Class Store

  • Direct Known Subclasses:
    POP3Store

    public abstract class Store
    extends java.lang.Object
    An abstract class that models a message store and its access protocol, for storing and retrieving messages. Subclasses provide actual implementations.
    Since:
    TotalCross 1.13
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Store​(MailSession session)  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void close()
      Close this store and terminate its connection.
      abstract void connect()
      A generic connect method that takes no parameters.
      abstract Folder getDefaultFolder()
      Returns a Folder object that represents the 'root' of the default namespace presented to the user by the Store.
      abstract Folder getFolder​(java.lang.String name)
      Return the Folder object corresponding to the given name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • connect

        public abstract void connect()
                              throws AuthenticationException,
                                     MessagingException
        A generic connect method that takes no parameters. Subclasses can implement the appropriate authentication schemes. Subclasses that need additional information might want to use some properties or might get it interactively. Most clients should just call this method to connect to the store.
        Throws:
        AuthenticationException
        MessagingException
        Since:
        TotalCross 1.13
      • close

        public abstract void close()
                            throws MessagingException
        Close this store and terminate its connection. Any Messaging components (Folders, Messages, etc.) belonging to this service are invalid after this store is closed. Note that the store is closed even if this method terminates abnormally by throwing a MessagingException.
        Throws:
        MessagingException
        Since:
        TotalCross 1.13
      • getFolder

        public abstract Folder getFolder​(java.lang.String name)
        Return the Folder object corresponding to the given name. Folder objects are not cached by the Store, so invoking this method on the same name multiple times will return that many distinct Folder objects.
        Parameters:
        name - The name of the Folder. In some Stores, name can be an absolute path if it starts with the hierarchy delimiter. Else it is interpreted relative to the 'root' of this namespace.
        Returns:
        Folder object
        Since:
        TotalCross 1.13
      • getDefaultFolder

        public abstract Folder getDefaultFolder()
        Returns a Folder object that represents the 'root' of the default namespace presented to the user by the Store.
        Returns:
        the root Folder
        Since:
        TotalCross 1.13