Package protocolP2P
Enum RequestResponseCode
- java.lang.Object
-
- java.lang.Enum<RequestResponseCode>
-
- protocolP2P.RequestResponseCode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<RequestResponseCode>
public enum RequestResponseCode extends java.lang.Enum<RequestResponseCode>
Request/Response code enum.- Version:
- 1.0
- Author:
- Louis Royer, Flavien Haas, JS Auge
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EMPTY_DIRECTORYEMPTY_FILEINTERNAL_ERRORLIST_REQUESTLIST_RESPONSELOAD_REQUESTLOAD_RESPONSENOT_FOUNDPROTOCOL_ERRORVERSION_ERROR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RequestResponseCodevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static RequestResponseCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LIST_REQUEST
public static final RequestResponseCode LIST_REQUEST
-
LOAD_REQUEST
public static final RequestResponseCode LOAD_REQUEST
-
LIST_RESPONSE
public static final RequestResponseCode LIST_RESPONSE
-
LOAD_RESPONSE
public static final RequestResponseCode LOAD_RESPONSE
-
VERSION_ERROR
public static final RequestResponseCode VERSION_ERROR
-
PROTOCOL_ERROR
public static final RequestResponseCode PROTOCOL_ERROR
-
INTERNAL_ERROR
public static final RequestResponseCode INTERNAL_ERROR
-
EMPTY_DIRECTORY
public static final RequestResponseCode EMPTY_DIRECTORY
-
NOT_FOUND
public static final RequestResponseCode NOT_FOUND
-
EMPTY_FILE
public static final RequestResponseCode EMPTY_FILE
-
-
Field Detail
-
codeType
public final CodeType codeType
-
codeValue
public final byte codeValue
-
-
Method Detail
-
values
public static RequestResponseCode[] 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 (RequestResponseCode c : RequestResponseCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RequestResponseCode 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
-
-