public abstract class HistoryVisitor extends Object
Methods are called from various threads, but are guaranteed to not be called concurrently.
Constructor and Description |
---|
HistoryVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
onFile(byte[] hash,
long time)
Called when the user has opened a file.
|
void |
onKey(byte status,
byte data1,
byte data2,
long currentTime,
long time)
Called when the user has pressed a key in the past.
|
abstract void |
onParsingComplete()
Called after parsing is complete.
|
void |
onStart(long time)
Called when the user begins a practice session.
|
public HistoryVisitor()
public void onStart(long time)
onFile(byte[], long)
.time
- the epoch time in milliseconds the sequence was started atpublic void onFile(byte[] hash, long time)
hash
- the SHA-256 hash code of the file that was openedtime
- the epoch time in milliseconds the event was played atpublic void onKey(byte status, byte data1, byte data2, long currentTime, long time) throws InvalidMidiDataException
status
- the status byte of the message the user playeddata1
- the first data byte of the messagedata2
- the second data byte of the messagecurrentTime
- the current song time in microseconds the message was played
attime
- the epoch time in milliseconds the event was played atInvalidMidiDataException
- if the message was invalidpublic abstract void onParsingComplete()
This method may be called multiple times, and is guaranteed to be called at least once if the log file is accessible. If notifications are no longer desired, then the visitor needs to be unregistered.
If the History
class was unable to initialize logging, this
method is never called.
Copyright © 2015 Kreatious LLC. All rights reserved.