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>
AOutgoingMessageInspector
implementation capable of inspecting message send from sdk to the live-scout feed
-
-
Constructor Summary
Constructors Constructor Description LiveScoutOutgoingMessageInspector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEventRequestRateLimitCount(OutgoingMessage message)
Gets the number of events contained by the passedOutgoingMessage
that must be rate-limited.int
getEventRequestRateLimitCount(String message)
Gets the number of events contained by the passed string representation of the message.boolean
isRateLimited(OutgoingMessage message)
Determines whether the current message should be request rate-limitedboolean
isRateLimited(String message)
Determines whether the current message representation should be request rate-limited
-
-
-
Method Detail
-
isRateLimited
public boolean isRateLimited(OutgoingMessage message)
Determines whether the current message should be request rate-limited- Specified by:
isRateLimited
in interfaceOutgoingMessageInspector<OutgoingMessage>
- Parameters:
message
- TheOutgoingMessage
representing the message to be inspected.- Returns:
- True if the passed
OutgoingMessage
must be rate-limited. Otherwise false. - Throws:
IllegalArgumentException
- Themessage
is a null reference or the type of themessage
is not correct
-
getEventRequestRateLimitCount
public int getEventRequestRateLimitCount(OutgoingMessage message)
Gets the number of events contained by the passedOutgoingMessage
that must be rate-limited.- Specified by:
getEventRequestRateLimitCount
in interfaceOutgoingMessageInspector<OutgoingMessage>
- Parameters:
message
- TheOutgoingMessage
representing the message to be inspected.- Returns:
- the number of events contained by the passed
OutgoingMessage
that must be rate-limited. - Throws:
IllegalArgumentException
- Themessage
is a null reference or the type of themessage
is not correct
-
isRateLimited
public boolean isRateLimited(String message)
Determines whether the current message representation should be request rate-limited- Specified by:
isRateLimited
in interfaceOutgoingMessageInspector<OutgoingMessage>
- Parameters:
message
- The string representation of the message- Returns:
- True if the passed message should be rate limited. Otherwise false.
- Throws:
IllegalArgumentException
- Themessage
is a null reference
-
getEventRequestRateLimitCount
public int getEventRequestRateLimitCount(String message)
Gets the number of events contained by the passed string representation of the message.- Specified by:
getEventRequestRateLimitCount
in 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
- Themessage
is a null reference
-
-