Package org.infinispan.protostream
Class MessageContext<E extends MessageContext<E>>
- java.lang.Object
-
- org.infinispan.protostream.MessageContext<E>
-
public class MessageContext<E extends MessageContext<E>> extends Object
A nested message processing context.- Since:
- 1.0
- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description MessageContext(E parentContext, FieldDescriptor fieldDescriptor, Descriptor messageDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDescriptor
getField()
Gets the nested field.FieldDescriptor
getFieldByName(String fieldName)
String
getFieldPath()
Gets the full path of the nested field.int
getMaxSeenFieldNumber()
Descriptor
getMessageDescriptor()
E
getParentContext()
boolean
isFieldMarked(int fieldNumber)
boolean
markField(int fieldNumber)
Mark a field as seen.
-
-
-
Constructor Detail
-
MessageContext
public MessageContext(E parentContext, FieldDescriptor fieldDescriptor, Descriptor messageDescriptor)
-
-
Method Detail
-
getParentContext
public E getParentContext()
-
getField
public FieldDescriptor getField()
Gets the nested field.- Returns:
- the descriptor of the nested field or
null
if this is the root context
-
getFieldPath
public String 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
public Descriptor getMessageDescriptor()
-
getFieldByName
public FieldDescriptor getFieldByName(String fieldName) throws IOException
- 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()
-
-