Package org.apache.commons.net.imap
Enum IMAPCommand
- java.lang.Object
-
- java.lang.Enum<IMAPCommand>
-
- org.apache.commons.net.imap.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 APPENDValid in authenticated state.AUTHENTICATEValid in Not Authenticated state.CAPABILITYValid in any state.CHECKValid in selected state (substate of authenticated).CLOSEValid in selected state (substate of authenticated).COPYValid in selected state (substate of authenticated).CREATEValid in authenticated state.DELETEValid in authenticated state.EXAMINEValid in authenticated state.EXPUNGEValid in selected state (substate of authenticated).FETCHValid in selected state (substate of authenticated).LISTValid in authenticated state.LOGINValid in Not Authenticated state.LOGOUTValid in any state.LSUBValid in authenticated state.NOOPValid in any state.RENAMEValid in authenticated state.SEARCHValid in selected state (substate of authenticated).SELECTValid in authenticated state.STARTTLSValid in Not Authenticated state.STATUSValid in authenticated state.STOREValid in selected state (substate of authenticated).SUBSCRIBEValid in authenticated state.UIDValid in selected state (substate of authenticated).UNSUBSCRIBEValid in authenticated state.XOAUTHAuthenticate an IMAP connection using OAuth.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringimapCommandprivate intmaxParamCountprivate intminParamCount
-
Constructor Summary
Constructors Modifier Constructor Description privateIMAPCommand()privateIMAPCommand(int paramCount)privateIMAPCommand(int minCount, int maxCount)privateIMAPCommand(java.lang.String name)privateIMAPCommand(java.lang.String name, int paramCount)privateIMAPCommand(java.lang.String name, int minCount, int maxCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetCommand(IMAPCommand command)Gets the IMAP protocol string command corresponding to a command code.java.lang.StringgetIMAPCommand()Gets the IMAP protocol string command for this commandstatic IMAPCommandvalueOf(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.
-
-
-
Enum Constant Detail
-
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).
-
-
Constructor Detail
-
IMAPCommand
private IMAPCommand()
-
IMAPCommand
private IMAPCommand(int paramCount)
-
IMAPCommand
private IMAPCommand(int minCount, int maxCount)
-
IMAPCommand
private IMAPCommand(java.lang.String name)
-
IMAPCommand
private IMAPCommand(java.lang.String name, int paramCount)
-
IMAPCommand
private IMAPCommand(java.lang.String name, int minCount, int maxCount)
-
-
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 namejava.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- theIMAPCommandwhose 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
-
-