Enum IMAPCommand

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IMAPCommand>

    public enum IMAPCommand
    extends java.lang.Enum<IMAPCommand>
    IMAPCommand stores IMAP command codes.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      APPEND
      Valid in authenticated state.
      AUTHENTICATE
      Valid in Not Authenticated state.
      CAPABILITY
      Valid in any state.
      CHECK
      Valid in selected state (substate of authenticated).
      CLOSE
      Valid in selected state (substate of authenticated).
      COPY
      Valid in selected state (substate of authenticated).
      CREATE
      Valid in authenticated state.
      DELETE
      Valid in authenticated state.
      EXAMINE
      Valid in authenticated state.
      EXPUNGE
      Valid in selected state (substate of authenticated).
      FETCH
      Valid in selected state (substate of authenticated).
      LIST
      Valid in authenticated state.
      LOGIN
      Valid in Not Authenticated state.
      LOGOUT
      Valid in any state.
      LSUB
      Valid in authenticated state.
      NOOP
      Valid in any state.
      RENAME
      Valid in authenticated state.
      SEARCH
      Valid in selected state (substate of authenticated).
      SELECT
      Valid in authenticated state.
      STARTTLS
      Valid in Not Authenticated state.
      STATUS
      Valid in authenticated state.
      STORE
      Valid in selected state (substate of authenticated).
      SUBSCRIBE
      Valid in authenticated state.
      UID
      Valid in selected state (substate of authenticated).
      UNSUBSCRIBE
      Valid in authenticated state.
      XOAUTH
      Authenticate an IMAP connection using OAuth.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCommand​(IMAPCommand command)
      Gets the IMAP protocol string command corresponding to a command code.
      java.lang.String getIMAPCommand()
      Gets the IMAP protocol string command for this command
      static IMAPCommand valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static IMAPCommand[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static IMAPCommand[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IMAPCommand c : IMAPCommand.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IMAPCommand valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCommand

        public static java.lang.String getCommand​(IMAPCommand command)
        Gets the IMAP protocol string command corresponding to a command code.
        Parameters:
        command - the IMAPCommand whose command string is required. Must not be null.
        Returns:
        The IMAP protocol string command corresponding to a command code.
      • getIMAPCommand

        public java.lang.String getIMAPCommand()
        Gets the IMAP protocol string command for this command
        Returns:
        The IMAP protocol string command corresponding to this command