-
- All Implemented Interfaces:
-
com.brightcove.player.event.Component
@Emits(events = {EventType.GSC_MAX_CONCURRENCY_REACHED, EventType.GSC_HEARTBEAT_STOPPED, EventType.GSC_ERROR})@ListensFor(events = {EventType.ACTIVITY_PAUSED, EventType.ACTIVITY_RESUMED, EventType.COMPLETED, EventType.DID_PLAY, EventType.FRAGMENT_PAUSED, EventType.FRAGMENT_RESUMED, EventType.STOP, EventType.SET_VIDEO_STILL, EventType.ENTER_PICTURE_IN_PICTURE_MODE, EventType.DID_ENTER_PICTURE_IN_PICTURE_MODE, EventType.DID_EXIT_PICTURE_IN_PICTURE_MODE}) public class ConcurrencyClient extends AbstractComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ConcurrencyClient.SessionsListener
-
Field Summary
Fields Modifier and Type Field Description public final static String
HEARTBEAT_ACCOUNTID_HEADER_KEY
public final static String
HEARTBEAT_VIDEO_HEADER_KEY
private final DefaultConcurrencyHandler
defaultConcurrencyHandler
-
Constructor Summary
Constructors Constructor Description ConcurrencyClient(Context context, EventEmitter eventEmitter, BaseVideoView brightcoveVideoView)
-
Method Summary
Modifier and Type Method Description final DefaultConcurrencyHandler
getDefaultConcurrencyHandler()
void
setRequestHeaders(Map<String, String> requestHeaders)
Set the headers that will be included in the request void
setSessionsListener(ConcurrencyClient.SessionsListener listener)
Set a SessionsListener to get the current active sessions void
requestActiveSessions()
Request the current active sessions. void
initializeEvents()
Initializes the events that the GSC should be listening to work properly. void
stopAndClear()
-
-
Constructor Detail
-
ConcurrencyClient
ConcurrencyClient(Context context, EventEmitter eventEmitter, BaseVideoView brightcoveVideoView)
-
-
Method Detail
-
getDefaultConcurrencyHandler
final DefaultConcurrencyHandler getDefaultConcurrencyHandler()
-
setRequestHeaders
void setRequestHeaders(Map<String, String> requestHeaders)
Set the headers that will be included in the request
-
setSessionsListener
void setSessionsListener(ConcurrencyClient.SessionsListener listener)
Set a SessionsListener to get the current active sessions
-
requestActiveSessions
void requestActiveSessions()
Request the current active sessions.Set a {#SessionsListener} to get the returned active sessions
-
initializeEvents
void initializeEvents()
Initializes the events that the GSC should be listening to work properly.By default, the constructor calls this method, but it should be called manuallyif the ConcurrencyClient was cleared by calling {stopAndClear}.
-
stopAndClear
void stopAndClear()
-
-
-
-