Class LiveScoutEntityMapper
- java.lang.Object
-
- com.sportradar.livedata.sdk.feed.livescout.classes.LiveScoutEntityMapper
-
- All Implemented Interfaces:
EntityMapper<IncomingMessage,LiveScoutEntityBase>
public class LiveScoutEntityMapper extends Object implements EntityMapper<IncomingMessage,LiveScoutEntityBase>
AEntityMapper
implementation used to map protocol layer scout messages into feed layer scout entities.
-
-
Constructor Summary
Constructors Constructor Description LiveScoutEntityMapper(LiveScoutEntityFactory factory)
Initializes a new instance of theLiveScoutEntityMapper
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LiveScoutEntityBase
map(IncomingMessage message)
Maps the passedIncomingMessage
derived message to feed entity
-
-
-
Constructor Detail
-
LiveScoutEntityMapper
@Inject public LiveScoutEntityMapper(LiveScoutEntityFactory factory)
Initializes a new instance of theLiveScoutEntityMapper
class.- Parameters:
factory
- ALiveScoutEntityFactory
used to build live scout entities.- Throws:
IllegalArgumentException
- thefactory
is a null reference orsdkLogger
is a null reference
-
-
Method Detail
-
map
public LiveScoutEntityBase map(IncomingMessage message) throws InvalidEntityException
Maps the passedIncomingMessage
derived message to feed entity- Specified by:
map
in interfaceEntityMapper<IncomingMessage,LiveScoutEntityBase>
- Parameters:
message
- TheIncomingMessage
derived message to be mapped to the feed layer entity.- Returns:
- The
LiveScoutEntityBase
derived class representing the passed message. - Throws:
IllegalArgumentException
- themessage
is a null referenceInvalidEntityException
- wrong entity provided
-
-