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 APPEND
Valid in authenticated state.AUTHENTICATE
Valid in Not Authenticated stateCAPABILITY
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 stateLOGOUT
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 stateSTATUS
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
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
imapCommand
private int
maxParamCount
private int
minParamCount
-
Constructor Summary
Constructors Modifier Constructor Description private
IMAPCommand()
private
IMAPCommand(int paramCount)
private
IMAPCommand(int minCount, int maxCount)
private
IMAPCommand(java.lang.String name)
private
IMAPCommand(java.lang.String name, int paramCount)
private
IMAPCommand(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.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 commandstatic 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.
-
-
-
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
-
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 final java.lang.String getCommand(IMAPCommand command)
Gets the IMAP protocol string command corresponding to a command code.- Parameters:
command
- theIMAPCommand
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
-
-