Interface MessageProcessor<T extends LiveScoutEntityBase>
- Type Parameters:
T- specifies the type of the messages processed by theMessageProcessor
- All Known Implementing Classes:
LiveScoutUserRequestManagerImpl,MessagePipeline
public interface MessageProcessor<T extends LiveScoutEntityBase>
Represents a class capable of receiving an input message, processing it and passing in forward for further processing
-
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Gets the index of the currentMessageProcessorimplementation used to determine the correct order of message processors when there are multiple message processors processing the same message.voidprocessMessage(T message) Processes the passed message derived fromLiveScoutEntityBaseclass.voidsetListener(MessageProcessorListener<T> listener) Sets theMessageProcessorListenerinstance used to observe the currentMessageProcessor
-
Method Details
-
getIndex
int getIndex()Gets the index of the currentMessageProcessorimplementation used to determine the correct order of message processors when there are multiple message processors processing the same message.- Returns:
- the index of the current
MessageProcessorimplementation
-
processMessage
Processes the passed message derived fromLiveScoutEntityBaseclass.- Parameters:
message- TheLiveScoutEntityBasederived class representing the message.- Throws:
IllegalArgumentException- themessageis a null reference.
-
setListener
Sets theMessageProcessorListenerinstance used to observe the currentMessageProcessor- Parameters:
listener- TheMessageProcessorListenerused to observe the processor.
-