Class LiveScoutOutgoingMessageInspector
java.lang.Object
com.sportradar.livedata.sdk.proto.livescout.LiveScoutOutgoingMessageInspector
- All Implemented Interfaces:
OutgoingMessageInspector<OutgoingMessage>
public class LiveScoutOutgoingMessageInspector
extends Object
implements OutgoingMessageInspector<OutgoingMessage>
A
OutgoingMessageInspector implementation capable of inspecting message send from sdk to the live-scout feed-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of events contained by the passedOutgoingMessagethat must be rate-limited.intgetEventRequestRateLimitCount(String message) Gets the number of events contained by the passed string representation of the message.booleanisRateLimited(OutgoingMessage message) Determines whether the current message should be request rate-limitedbooleanisRateLimited(String message) Determines whether the current message representation should be request rate-limited
-
Constructor Details
-
LiveScoutOutgoingMessageInspector
public LiveScoutOutgoingMessageInspector()
-
-
Method Details
-
isRateLimited
Determines whether the current message should be request rate-limited- Specified by:
isRateLimitedin interfaceOutgoingMessageInspector<OutgoingMessage>- Parameters:
message- TheOutgoingMessagerepresenting the message to be inspected.- Returns:
- True if the passed
OutgoingMessagemust be rate-limited. Otherwise false. - Throws:
IllegalArgumentException- Themessageis a null reference or the type of themessageis not correct
-
getEventRequestRateLimitCount
Gets the number of events contained by the passedOutgoingMessagethat must be rate-limited.- Specified by:
getEventRequestRateLimitCountin interfaceOutgoingMessageInspector<OutgoingMessage>- Parameters:
message- TheOutgoingMessagerepresenting the message to be inspected.- Returns:
- the number of events contained by the passed
OutgoingMessagethat must be rate-limited. - Throws:
IllegalArgumentException- Themessageis a null reference or the type of themessageis not correct
-
isRateLimited
Determines whether the current message representation should be request rate-limited- Specified by:
isRateLimitedin interfaceOutgoingMessageInspector<OutgoingMessage>- Parameters:
message- The string representation of the message- Returns:
- True if the passed message should be rate limited. Otherwise false.
- Throws:
IllegalArgumentException- Themessageis a null reference
-
getEventRequestRateLimitCount
Gets the number of events contained by the passed string representation of the message.- Specified by:
getEventRequestRateLimitCountin interfaceOutgoingMessageInspector<OutgoingMessage>- Parameters:
message- The message to be inspected.- Returns:
- The number of events contained in the passed message that must be rate limited.
- Throws:
IllegalArgumentException- Themessageis a null reference
-