Class RpcPacketFieldRule
java.lang.Object
com.perforce.p4java.impl.mapbased.rpc.packet.helper.RpcPacketFieldRule
- Direct Known Subclasses:
RpcPacketFieldPatternRule,RpcPacketFieldRangeRule
Super class representing the rule for skipping the charset conversion of the
RPC packet field values (bytes). Leave those field values as bytes instead of
converting them to strings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key for storing the field pattern in a command map.protected booleanIf true, skip charset conversion; leave the value as is in bytes.static final StringThe key for storing the start field name in a command map.static final StringThe key for storing the stop field name in a command map. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RpcPacketFieldRulegetInstance(Map<String, Object> cmdMap) Factory static method to create an instance of a subclass based on the content of a command map.booleanChecks if is skip conversion.abstract voidUpdates the conversion rule.
-
Field Details
-
FIELD_PATTERN
The key for storing the field pattern in a command map.- See Also:
-
START_FIELD
The key for storing the start field name in a command map.- See Also:
-
STOP_FIELD
The key for storing the stop field name in a command map.- See Also:
-
skipConversion
protected boolean skipConversionIf true, skip charset conversion; leave the value as is in bytes.
-
-
Constructor Details
-
RpcPacketFieldRule
public RpcPacketFieldRule()
-
-
Method Details
-
getInstance
Factory static method to create an instance of a subclass based on the content of a command map. Note that the instance creation will be processed in the order listed below.The existing of a FIELD_PATTERN key with a string value will create a RpcPacketFieldPatternRule object.
The existing of both the START_FIELD and STOP_FIELD keys with string values will create a RpcPacketFieldRangeRule object.
- Parameters:
cmdMap- cmdMap- Returns:
- RpcPacketFieldRule
-
update
Updates the conversion rule.- Parameters:
fieldName- the field name
-
isSkipConversion
public boolean isSkipConversion()Checks if is skip conversion.- Returns:
- true, if is skip conversion
-