Package org.infinispan.protostream
Class MessageContext<E extends MessageContext<E>>
java.lang.Object
org.infinispan.protostream.MessageContext<E>
A nested message processing context.
- Since:
- 1.0
- Author:
- [email protected]
-
Constructor Summary
ConstructorDescriptionMessageContext
(E parentContext, FieldDescriptor fieldDescriptor, Descriptor messageDescriptor) -
Method Summary
Modifier and TypeMethodDescriptiongetField()
Gets the nested field.getFieldByName
(String fieldName) Gets the full path of the nested field.int
boolean
isFieldMarked
(int fieldNumber) boolean
markField
(int fieldNumber) Mark a field as seen.
-
Constructor Details
-
MessageContext
public MessageContext(E parentContext, FieldDescriptor fieldDescriptor, Descriptor messageDescriptor)
-
-
Method Details
-
getParentContext
-
getField
Gets the nested field.- Returns:
- the descriptor of the nested field or
null
if this is the root context
-
getFieldPath
Gets the full path of the nested field.- Returns:
- the full path of the nested field or
null
if this is the root context
-
getMessageDescriptor
-
getFieldByName
- Throws:
IOException
-
isFieldMarked
public boolean isFieldMarked(int fieldNumber) -
markField
public boolean markField(int fieldNumber) Mark a field as seen.- Parameters:
fieldNumber
- the field number- Returns:
- true if it was added, false if it was already there
-
getMaxSeenFieldNumber
public int getMaxSeenFieldNumber()
-