org.bff.javampd.events
Class MPDChangeEvent

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

public class MPDChangeEvent
extends java.util.EventObject

An event used to identify an administrative action.

See Also:
Serialized Form

Field Summary
static int MPD_KILLED
          administrator killed the connection
static int MPD_REFRESHED
          administrator refreshed the database
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MPDChangeEvent(java.lang.Object source, int id)
          Creates a new instance of MusicPlayerStatusChangedEvent
MPDChangeEvent(java.lang.Object source, int id, java.lang.String msg)
          Creates a new instance of MusicPlayerStatusChangedEvent
 
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

MPD_KILLED

public static final int MPD_KILLED
administrator killed the connection

See Also:
Constant Field Values

MPD_REFRESHED

public static final int MPD_REFRESHED
administrator refreshed the database

See Also:
Constant Field Values
Constructor Detail

MPDChangeEvent

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

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

MPDChangeEvent

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

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