Class JaxbProtocolContext<T>
java.lang.Object
org.apache.nifi.cluster.protocol.jaxb.JaxbProtocolContext<T>
- Type Parameters:
T
- The type of protocol message.
- All Implemented Interfaces:
ProtocolContext<T>
Implements a context for communicating internally amongst the cluster using
JAXB.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final jakarta.xml.bind.JAXBContext
private static final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a marshaller for serializing protocol messages.Creates an unmarshaller for deserializing protocol messages.
-
Field Details
-
BUF_SIZE
private static final int BUF_SIZE -
MESSAGE_PROTOCOL_START_SENTINEL
private static final byte MESSAGE_PROTOCOL_START_SENTINEL- See Also:
-
jaxbCtx
private final jakarta.xml.bind.JAXBContext jaxbCtx
-
-
Constructor Details
-
JaxbProtocolContext
public JaxbProtocolContext(jakarta.xml.bind.JAXBContext jaxbCtx)
-
-
Method Details
-
createMarshaller
Description copied from interface:ProtocolContext
Creates a marshaller for serializing protocol messages.- Specified by:
createMarshaller
in interfaceProtocolContext<T>
- Returns:
- a marshaller
-
createUnmarshaller
Description copied from interface:ProtocolContext
Creates an unmarshaller for deserializing protocol messages.- Specified by:
createUnmarshaller
in interfaceProtocolContext<T>
- Returns:
- a unmarshaller
-