Enum Class RpcFunctionType

java.lang.Object
java.lang.Enum<RpcFunctionType>
com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionType
All Implemented Interfaces:
Serializable, Comparable<RpcFunctionType>, Constable

public enum RpcFunctionType extends Enum<RpcFunctionType>
How we classify a Perforce RPC function for dispatch, encoding, and other processing.
  • Enum Constant Details

    • 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 Details

    • values

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

      public static RpcFunctionType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getEncodingPrefix

      public 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 String getTypeNamePrefix()
      Returns:
      the name prefix (e.g. "USER_") for this func spec.