org.bff.javampd.events
Class PlayerChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.bff.javampd.events.PlayerChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class PlayerChangeEvent
extends java.util.EventObject

Represents a change in the status of a MPD music player.

See Also:
Serialized Form

Field Summary
static int PLAYER_MUTED
          the volume was muted
static int PLAYER_NEXT
          the player requesting the next song in the playlist
static int PLAYER_PAUSED
          the player was paused
static int PLAYER_PREVIOUS
          the player requesting the previous song in the playlist
static int PLAYER_SEEKING
          the player is seeking within a song
static int PLAYER_SONG_SET
          a specific song was requested by the player
static int PLAYER_STARTED
          the player was started
static int PLAYER_STOPPED
          the player was stopped
static int PLAYER_UNMUTED
          the volume was unmuted
static int PLAYER_UNPAUSED
          the player was taken off pause
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PlayerChangeEvent(java.lang.Object source, int id)
          Creates a new instance of PlayerChangeEvent
PlayerChangeEvent(java.lang.Object source, int id, java.lang.String msg)
          Creates a new instance of PlayerChangeEvent
 
Method Summary
 int getId()
          Returns specific id of the event that occurred.
 java.lang.String getMsg()
          Returns the message attached to this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLAYER_STOPPED

public static final int PLAYER_STOPPED
the player was stopped

See Also:
Constant Field Values

PLAYER_STARTED

public static final int PLAYER_STARTED
the player was started

See Also:
Constant Field Values

PLAYER_PAUSED

public static final int PLAYER_PAUSED
the player was paused

See Also:
Constant Field Values

PLAYER_NEXT

public static final int PLAYER_NEXT
the player requesting the next song in the playlist

See Also:
Constant Field Values

PLAYER_PREVIOUS

public static final int PLAYER_PREVIOUS
the player requesting the previous song in the playlist

See Also:
Constant Field Values

PLAYER_MUTED

public static final int PLAYER_MUTED
the volume was muted

See Also:
Constant Field Values

PLAYER_UNMUTED

public static final int PLAYER_UNMUTED
the volume was unmuted

See Also:
Constant Field Values

PLAYER_SONG_SET

public static final int PLAYER_SONG_SET
a specific song was requested by the player

See Also:
Constant Field Values

PLAYER_UNPAUSED

public static final int PLAYER_UNPAUSED
the player was taken off pause

See Also:
Constant Field Values

PLAYER_SEEKING

public static final int PLAYER_SEEKING
the player is seeking within a song

See Also:
Constant Field Values
Constructor Detail

PlayerChangeEvent

public PlayerChangeEvent(java.lang.Object source,
                         int id)
Creates a new instance of PlayerChangeEvent

Parameters:
source - the object on which the Event initially occurred
id - the specific event that occurred

PlayerChangeEvent

public PlayerChangeEvent(java.lang.Object source,
                         int id,
                         java.lang.String msg)
Creates a new instance of PlayerChangeEvent

Parameters:
source - the object on which the Event initially occurred
id - the specific event that occurred
msg - an optional message
Method Detail

getId

public int getId()
Returns specific id of the event that occurred. The ids are public static fields in the class.

Returns:
the specific id

getMsg

public java.lang.String getMsg()
Returns the message attached to this event. If there is no message null is returned.

Returns:
the optional message