public class VideoManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
VideoManager.Listener
Listener for add/remove events
|
Modifier and Type | Field and Description |
---|---|
static java.io.File |
DIR |
static java.io.File |
ENTRIES_DIR |
Constructor and Description |
---|
VideoManager(MapView mapView) |
Modifier and Type | Method and Description |
---|---|
void |
addEntries(java.util.List<ConnectionEntry> entries)
Calls addEntries with the list and persists the entry to a file automatically
|
void |
addEntries(java.util.List<ConnectionEntry> entries,
boolean persist)
Add a list of connection entries to the manager
|
void |
addEntry(ConnectionEntry entry)
Add an entry to the manager (which is then persisted to the filesystem)
|
void |
addListener(VideoManager.Listener l)
Add a listener for manager events
|
void |
dispose()
Dispose the video manager
|
java.util.List<ConnectionEntry> |
getEntries()
Get the full list of registered connection entries
|
java.util.List<ConnectionEntry> |
getEntries(java.util.Set<java.lang.String> uids)
Get a list of registered connection entries
|
ConnectionEntry |
getEntry(java.lang.String uid)
Get a connection entry by its UID
|
static VideoManager |
getInstance() |
java.util.List<ConnectionEntry> |
getRemoteEntries()
Get a list of all remote connection entries
|
VideoXMLHandler |
getXMLHandler()
Get the video XML handler used by the manager
Using this handler over a newly created one prevents sync issues
when reading and writing entries
|
void |
init() |
void |
persist(ConnectionEntry entry)
Persist a connection entry to the file system
Entries use their UID for the file name
|
void |
removeEntries(java.util.Set<java.lang.String> uids)
Remove a set of entries by their UIDs
|
void |
removeEntry(ConnectionEntry entry)
Removes an entry from both the filesystem and the local in memory list.
|
void |
removeEntry(java.lang.String uid)
Remove an entry from the cache and file system
Note that this will remove non-remote videos as well
|
void |
removeListener(VideoManager.Listener l) |
public static final java.io.File DIR
public static final java.io.File ENTRIES_DIR
public VideoManager(MapView mapView)
public static VideoManager getInstance()
public void init()
public void dispose()
public ConnectionEntry getEntry(java.lang.String uid)
uid
- Connection entry UIDpublic java.util.List<ConnectionEntry> getEntries()
public java.util.List<ConnectionEntry> getEntries(java.util.Set<java.lang.String> uids)
uids
- Entry UIDspublic java.util.List<ConnectionEntry> getRemoteEntries()
public void addEntry(ConnectionEntry entry)
entry
- Connection entrypublic void addEntries(java.util.List<ConnectionEntry> entries, boolean persist)
entries
- List of connection entriespublic void addEntries(java.util.List<ConnectionEntry> entries)
entries
- the list of entriespublic void removeEntry(java.lang.String uid)
uid
- Connection entry UIDpublic void removeEntry(ConnectionEntry entry)
entry
- the entry to be removed.public void removeEntries(java.util.Set<java.lang.String> uids)
uids
- Set of entry UIDspublic void persist(ConnectionEntry entry)
entry
- Connection entrypublic VideoXMLHandler getXMLHandler()
public void addListener(VideoManager.Listener l)
l
- Listenerpublic void removeListener(VideoManager.Listener l)