com.perforce.p4java.impl.mapbased.rpc.func
Enum RpcFunctionType

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

public enum RpcFunctionType
extends Enum<RpcFunctionType>

How we classify a Perforce RPC function for dispatch, encoding, and other processing.


Enum Constant Summary
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
 String getEncodingPrefix()
          Get the string prefix used by this function type when encoded for the wire.
 String getTypeNamePrefix()
          Return the name prefix (e.g.
static RpcFunctionType valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getEncodingPrefix

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



Copyright © 2015 Perforce Software. All Rights Reserved.