Class MailBox

java.lang.Object
overit.geocall.mail.MailBox

public class MailBox extends Object
Class that manages the mailbox with its protocols, host, port etc.
  • Field Details

    • TYPE_IMAP

      public static final String TYPE_IMAP
      See Also:
    • TYPE_IMAPS

      public static final String TYPE_IMAPS
      See Also:
    • TYPE_POP

      public static final String TYPE_POP
      See Also:
    • TYPE_POP3S

      public static final String TYPE_POP3S
      See Also:
    • _technique

      protected int _technique
    • _protocol

      protected String _protocol
    • _host

      protected String _host
    • _port

      protected Integer _port
    • _timeout

      protected Integer _timeout
    • _cacheTime

      protected Integer _cacheTime
    • _fullClientParsing

      protected boolean _fullClientParsing
    • _exchangeSharedFolder

      protected boolean _exchangeSharedFolder
    • _folderName

      protected String _folderName
    • _a

      protected Authenticator _a
    • _store

      protected Store _store
    • _folder

      protected Folder _folder
    • _messages

      protected Message[] _messages
    • _cursor

      protected int _cursor
    • _fl

      protected FetchLogger _fl
    • _name

      protected String _name
    • _debug

      protected boolean _debug
    • _tls

      protected boolean _tls
    • _ssl

      protected String _ssl
    • _toCommit

      protected LinkedList _toCommit
      Se nullo significa che ? automommittante, altrimenti contiene la lista degli indici dei messaggi da committare;
    • FETCH_AND_REMOVE

      public static final int FETCH_AND_REMOVE
      See Also:
    • FETCH_AND_READ

      public static final int FETCH_AND_READ
      See Also:
    • FETCH_AND_NOTHING

      public static final int FETCH_AND_NOTHING
      See Also:
  • Constructor Details

  • Method Details

    • setFetchLogger

      public void setFetchLogger(String name, FetchLogger fl)
      Sets the fetch logger
      Parameters:
      name - String containing the name
      fl - The FetchLogger to set
    • getTls

      public boolean getTls()
      Returns if tls is abilitated or not
      Returns:
      true if tls is abilitated, false otherwise
    • getSsl

      public String getSsl()
      Returns the ssl
      Returns:
      String containing the ssl
    • setProtocol

      public final void setProtocol(String protocol)
      Sets the protocol
      Parameters:
      protocol - The protocol
    • getProtocol

      public String getProtocol()
      Returns the protocol
      Returns:
      String containing the protocol
    • setAutoCommit

      public void setAutoCommit(boolean autocommit) throws EmailException
      Sets autocommit capability
      Parameters:
      autocommit - Boolean value for autocommit
      Throws:
      EmailException - If an exception occurs sending the email
    • getFullClientParsing

      public boolean getFullClientParsing()
      Returns if the full client parsing is abilitated
      Returns:
      true if the full client parsing is abilitated, false otherwise
    • nextMessage

      public String nextMessage() throws EmailException
      Returns the next message
      Returns:
      The next message
      Throws:
      EmailException - if an error occurs
    • fetchMessage

      public Message fetchMessage() throws EmailException
      Fetch the message
      Returns:
      The Message
      Throws:
      EmailException - If an error occurs
    • commit

      public void commit() throws EmailException
      Commit the messages
      Throws:
      EmailException - if an error occurs
    • rollback

      public void rollback() throws EmailException
      Roll back the commit of the messages
      Throws:
      EmailException - if an error occurs
    • getUID

      public String getUID()
      Returns the UID
      Returns:
      The UID
    • close

      public void close()
      Close the folder
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception