Class MessageProcessor<T extends DigitalTwinBase,V>
- java.lang.Object
-
- com.scaleoutsoftware.digitaltwin.core.MessageProcessorBase<T>
-
- com.scaleoutsoftware.digitaltwin.core.MessageProcessor<T,V>
-
- Type Parameters:
T
- the real type of the DigitalTwinBaseV
- the type of messages processed by the real-time digital twin
- All Implemented Interfaces:
java.io.Serializable
public abstract class MessageProcessor<T extends DigitalTwinBase,V> extends MessageProcessorBase<T> implements java.io.Serializable
Processes messages for a real-time digital twin.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MessageProcessor()
Default constructor.
-
Method Summary
Modifier and Type Method Description ProcessingResult
processMessages(ProcessingContext context, T twin, MessageFactory factory)
Helper method to ensure proper typing for user methods.abstract ProcessingResult
processMessages(ProcessingContext context, T stateObject, java.lang.Iterable<V> incomingMessages)
Processes a set of incoming messages and determines whether to update the real-time digital twin.
-
-
-
Method Detail
-
processMessages
public abstract ProcessingResult processMessages(ProcessingContext context, T stateObject, java.lang.Iterable<V> incomingMessages) throws java.lang.Exception
Processes a set of incoming messages and determines whether to update the real-time digital twin.- Parameters:
context
- optional context for processing.stateObject
- the state object.incomingMessages
- the incoming messages.- Returns:
- processing results for updating the state object.
- Throws:
java.lang.Exception
- if an exception occurs during processing
-
processMessages
public ProcessingResult processMessages(ProcessingContext context, T twin, MessageFactory factory) throws java.lang.Exception
Helper method to ensure proper typing for user methods.- Specified by:
processMessages
in classMessageProcessorBase<T extends DigitalTwinBase>
- Parameters:
context
- the processing context.twin
- the digital twin object.factory
- the message list factory.- Returns:
- the implementing class's processing result.
- Throws:
java.lang.Exception
- if an exception occurs during processing.
-
-