|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lyra.Database.Audit
public class Audit
Attaches an auditing stream to the connection with the Music Player Daemon enabling us to track songs played, skipped, added to the playlist whilst in operation. This can be tied later on to list generation and player habits.
Field Summary | |
---|---|
private static java.lang.String |
CLASS
|
private java.lang.String |
CurrentFilename
|
private java.util.Set<java.lang.String> |
CurrentListing
|
private Status |
Info
|
private java.util.Map<java.lang.String,java.lang.String> |
Lang
|
private Ledger |
Logger
|
private Comptroller |
Manager
|
Constructor Summary | |
---|---|
Audit(Comptroller manager,
Status info,
Ledger logger,
java.util.Map<java.lang.String,java.lang.String> lang)
Constructor requires an element from the database and daemon side in order to function properly. |
Method Summary | |
---|---|
void |
hostUpdated(UpdateEvent update)
Updates of host information as passed through this specific method. |
private void |
logReplace(java.lang.String msg,
java.lang.String file,
java.lang.String state)
Since filenames can carry with them certain undesired elements, we make ensure they will have no effect in the logging. |
private java.util.Set<java.lang.String> |
updateCurrent()
Extracts a list of filenames within the the current playlist connection in order to more easily compare. |
private java.lang.String |
updateFilename(java.util.Map<java.lang.String,java.lang.String> state)
Extracts the information from the org.lyra.Host.Status class and extracts the currently playing song. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Comptroller Manager
private Status Info
private Ledger Logger
private java.util.Map<java.lang.String,java.lang.String> Lang
private java.lang.String CurrentFilename
private java.util.Set<java.lang.String> CurrentListing
private static final java.lang.String CLASS
Constructor Detail |
---|
public Audit(Comptroller manager, Status info, Ledger logger, java.util.Map<java.lang.String,java.lang.String> lang)
manager
- Database interface for insertion into the auditing table.info
- Information handle on the daemon.logger
- Ledger instance for logging of information.lang
- Independent language instance.Method Detail |
---|
public void hostUpdated(UpdateEvent update)
UpdateListener
hostUpdated
in interface UpdateListener
update
- Update notification method.UpdateEvent
private java.util.Set<java.lang.String> updateCurrent()
private java.lang.String updateFilename(java.util.Map<java.lang.String,java.lang.String> state)
private void logReplace(java.lang.String msg, java.lang.String file, java.lang.String state)
msg
- Error message to pass up.file
- Filename that is affected.state
- State to change to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |