-
- All Implemented Interfaces:
-
com.theoplayer.android.api.event.EventDispatcher
public interface Cache implements EventDispatcher<CacheEvent>
The media caching API.
-
-
Method Summary
Modifier and Type Method Description abstract CacheStatus
getStatus()
The current status of the cache. abstract CachingTaskList
getTasks()
List of caching tasks which control the caching of media. abstract CachingTask
createTask(@NonNull() SourceDescription source, @Nullable() CachingParameters parameters)
Creates a caching task which controls the caching of the media. abstract void
setNotificationBuilder(@NonNull() CacheNotificationsBuilder builder)
Sets the CacheNotificationsBuilder to be used for constructing cache notifications and notification channel. abstract CacheNotificationsBuilder
getNotificationBuilder()
Retrieves the current CacheNotificationsBuilder instance used for constructing cache notifications. abstract Network
getNetwork()
The Network API that manages the caching. -
-
Method Detail
-
getStatus
@NonNull() abstract CacheStatus getStatus()
-
getTasks
@NonNull() abstract CachingTaskList getTasks()
List of caching tasks which control the caching of media.
- To remove a task from the list, invoke remove.
-
createTask
abstract CachingTask createTask(@NonNull() SourceDescription source, @Nullable() CachingParameters parameters)
Creates a caching task which controls the caching of the media.
- Parameters:
source
- Describes the media source to be cached.parameters
- Contains caching task related options.
-
setNotificationBuilder
abstract void setNotificationBuilder(@NonNull() CacheNotificationsBuilder builder)
Sets the CacheNotificationsBuilder to be used for constructing cache notifications and notification channel.
- Parameters:
builder
- The CacheNotificationsBuilder instance to be set.
-
getNotificationBuilder
@NonNull() abstract CacheNotificationsBuilder getNotificationBuilder()
Retrieves the current CacheNotificationsBuilder instance used for constructing cache notifications.
-
getNetwork
@NonNull() abstract Network getNetwork()
The Network API that manages the caching.
-
-
-
-