Package org.apache.commons.net.imap

# Enum IMAPCommand

java.lang.Object
java.lang.Enum<IMAPCommand>
org.apache.commons.net.imap.IMAPCommand

All Implemented Interfaces:
  `Serializable`, `Comparable<IMAPCommand>`

public enum IMAPCommand extends 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

  Modifier and Type
  Method
  Description
  `static String`
  `getCommand(IMAPCommand command)`
  Gets the IMAP protocol string command corresponding to a command code.
  `String`
  `getIMAPCommand()`
  Gets the IMAP protocol string command for this command
  `static IMAPCommand`
  `valueOf(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`

- ## Enum Constant Details

  - ### CAPABILITY

    public static final IMAPCommand CAPABILITY
    Valid in any state.

  - ### NOOP

    public static final IMAPCommand NOOP
    Valid in any state.

  - ### LOGOUT

    public static final IMAPCommand LOGOUT
    Valid in any state.

  - ### STARTTLS

    public static final IMAPCommand STARTTLS
    Valid in Not Authenticated state

  - ### AUTHENTICATE

    public static final IMAPCommand AUTHENTICATE
    Valid in Not Authenticated state

  - ### LOGIN

    public static final IMAPCommand LOGIN
    Valid in Not Authenticated state

  - ### XOAUTH

    public static final IMAPCommand XOAUTH
    Authenticate an IMAP connection using OAuth.

  - ### SELECT

    public static final IMAPCommand SELECT
    Valid in authenticated state.

  - ### EXAMINE

    public static final IMAPCommand EXAMINE
    Valid in authenticated state.

  - ### CREATE

    public static final IMAPCommand CREATE
    Valid in authenticated state.

  - ### DELETE

    public static final IMAPCommand DELETE
    Valid in authenticated state.

  - ### RENAME

    public static final IMAPCommand RENAME
    Valid in authenticated state.

  - ### SUBSCRIBE

    public static final IMAPCommand SUBSCRIBE
    Valid in authenticated state.

  - ### UNSUBSCRIBE

    public static final IMAPCommand UNSUBSCRIBE
    Valid in authenticated state.

  - ### LIST

    public static final IMAPCommand LIST
    Valid in authenticated state.

  - ### LSUB

    public static final IMAPCommand LSUB
    Valid in authenticated state.

  - ### STATUS

    public static final IMAPCommand STATUS
    Valid in authenticated state.

  - ### APPEND

    public static final IMAPCommand APPEND
    Valid in authenticated state.

  - ### CHECK

    public static final IMAPCommand CHECK
    Valid in selected state (substate of authenticated).

  - ### CLOSE

    public static final IMAPCommand CLOSE
    Valid in selected state (substate of authenticated).

  - ### EXPUNGE

    public static final IMAPCommand EXPUNGE
    Valid in selected state (substate of authenticated).

  - ### SEARCH

    public static final IMAPCommand SEARCH
    Valid in selected state (substate of authenticated).

  - ### FETCH

    public static final IMAPCommand FETCH
    Valid in selected state (substate of authenticated).

  - ### STORE

    public static final IMAPCommand STORE
    Valid in selected state (substate of authenticated).

  - ### COPY

    public static final IMAPCommand COPY
    Valid in selected state (substate of authenticated).

  - ### UID

    public static final IMAPCommand UID
    Valid in selected state (substate of authenticated).

- ## Method Details

  - ### values

    public static IMAPCommand[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static IMAPCommand valueOf(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:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getCommand

    public static 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 String getIMAPCommand()
    Gets the IMAP protocol string command for this command
    Returns:
      The IMAP protocol string command corresponding to this command