Enum RpcFunctionType
- java.lang.Object
-
- java.lang.Enum<RpcFunctionType>
-
- com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RpcFunctionType>
public enum RpcFunctionType extends java.lang.Enum<RpcFunctionType>
How we classify a Perforce RPC function for dispatch, encoding, and other processing.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLIENT
"Simple" client functions, e.g.CLIENT_DM
More complex client functions that will probably cause duplex back-and-forth messaging between client and server.NONE
Non-function; mainly serves as an error or guard.PROTOCOL
Protocol meta functions, e.g.SERVER
Server functions to be processed by the Perforce server.USER
The normal end-user-initiated perforce functions, e.g.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getEncodingPrefix()
java.lang.String
getTypeNamePrefix()
static RpcFunctionType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RpcFunctionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLIENT
public static final RpcFunctionType CLIENT
"Simple" client functions, e.g. "client-Message" to be processed by the client and that do not (generally...) require further interaction with the server.
-
CLIENT_DM
public static final RpcFunctionType CLIENT_DM
More complex client functions that will probably cause duplex back-and-forth messaging between client and server.
-
USER
public static final RpcFunctionType USER
The normal end-user-initiated perforce functions, e.g. "info" or "depots".
-
SERVER
public static final RpcFunctionType SERVER
Server functions to be processed by the Perforce server.
-
PROTOCOL
public static final RpcFunctionType PROTOCOL
Protocol meta functions, e.g. "flush1" or "compress2".
-
NONE
public static final RpcFunctionType NONE
Non-function; mainly serves as an error or guard.
-
-
Method Detail
-
values
public static RpcFunctionType[] 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 (RpcFunctionType c : RpcFunctionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RpcFunctionType 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
-
getEncodingPrefix
public java.lang.String getEncodingPrefix()
- Returns:
- the string prefix used by this function type when encoded for the wire. E.g. "dm-" for CLIENT_DM, or "user" for USER. The protocol type has no prefix (at least none that I've seen).
-
getTypeNamePrefix
public java.lang.String getTypeNamePrefix()
- Returns:
- the name prefix (e.g. "USER_") for this func spec.
-
-