org.lyra.Host
Class UpdateEvent

java.lang.Object
  extended by org.lyra.Host.UpdateEvent

public class UpdateEvent
extends java.lang.Object

Event encapsulating an update from the host element. By default the only element that will trigger this element will come from the Updater class.

Version:
1.0.5, %Revision, 174%, %LastChangedDate, 27/10/12 3:33PM%
Author:
Martin Foster
See Also:
Updater, UpdateListener

Field Summary
private  java.util.Set<java.lang.String> Commands
           
private  java.lang.Object Source
           
private  java.lang.Long Timestamp
           
 
Constructor Summary
UpdateEvent(java.lang.Object source, java.lang.String... updates)
          Primary constructor for the event generated.
 
Method Summary
 java.lang.Object getSource()
          The object on which the Event initially occurred.
 boolean isCurrent()
          Has the Current been triggered.
 boolean isDatabase()
          Has the Database been triggered.
 boolean isLibrary()
          Has the Library been triggered.
 boolean isMixer()
          Has the Mixer been triggered.
 boolean isOptions()
          Has the Options been triggered.
 boolean isOutput()
          Has the Output been triggered.
 boolean isPlayer()
          Has the Player been triggered.
 boolean isPlaylist()
          Has the Playlist been triggered.
 boolean isUpdate()
          Has a library update process been triggered.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Commands

private java.util.Set<java.lang.String> Commands

Source

private java.lang.Object Source

Timestamp

private java.lang.Long Timestamp
Constructor Detail

UpdateEvent

public UpdateEvent(java.lang.Object source,
                   java.lang.String... updates)
Primary constructor for the event generated. Takes the source of the caller and all of the updates that have happened at server level.

Parameters:
source - Source object triggering the event.
updates - String commands representing updates.
Method Detail

getSource

public java.lang.Object getSource()
The object on which the Event initially occurred.

Returns:
The object on which the Event initially occurred.

isLibrary

public boolean isLibrary()
Has the Library been triggered. The song database has been modified after update.

Returns:
Boolean indicating trigger.

isUpdate

public boolean isUpdate()
Has a library update process been triggered. THis differs from a Library trigger since this implies the process is still ongoing. Typically to be avoided.

Returns:
Boolean indicating trigger.

isPlaylist

public boolean isPlaylist()
Has the Playlist been triggered. A stored playlist has been modified, renamed, created or deleted.

Returns:
Boolean indicating trigger.

isCurrent

public boolean isCurrent()
Has the Current been triggered. The current playlist has been modified.

Returns:
Boolean indicating trigger.

isDatabase

public boolean isDatabase()
Has the Database been triggered. The database has received an update.

Returns:
Boolean indicating trigger.

isPlayer

public boolean isPlayer()
Has the Player been triggered. The player has been started, stopped or seeked.

Returns:
Boolean indicating trigger.

isMixer

public boolean isMixer()
Has the Mixer been triggered. The volume has been changed.

Returns:
Boolean indicating trigger.

isOutput

public boolean isOutput()
Has the Output been triggered. An audio output has been enabled or disabled.

Returns:
Boolean indicating trigger.

isOptions

public boolean isOptions()
Has the Options been triggered. Options like repeat, random, crossfade, replay and gain.

Returns:
Boolean indicating trigger.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object