org.bff.javampd.events
Class ConnectionChangeEvent

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

public class ConnectionChangeEvent
extends java.util.EventObject

An event used to identify a change in connection status.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConnectionChangeEvent(java.lang.Object source, boolean isConnected)
          Creates a new instance of ConnectionChangeEvent
ConnectionChangeEvent(java.lang.Object source, boolean isConnected, java.lang.String msg)
          Creates a new instance of ConnectionChangeEvent
 
Method Summary
 java.lang.String getMsg()
          Returns the message attached to this event.
 boolean isConnected()
          Returns true if there is a connection with the MPD server.
 
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
 

Constructor Detail

ConnectionChangeEvent

public ConnectionChangeEvent(java.lang.Object source,
                             boolean isConnected)
Creates a new instance of ConnectionChangeEvent

Parameters:
source - the object on which the Event initially occurred
isConnected - the connection status

ConnectionChangeEvent

public ConnectionChangeEvent(java.lang.Object source,
                             boolean isConnected,
                             java.lang.String msg)
Creates a new instance of ConnectionChangeEvent

Parameters:
msg - an optional message
source - the object on which the Event initially occurred
isConnected - the connection status
Method Detail

isConnected

public boolean isConnected()
Returns true if there is a connection with the MPD server. If there is no connection returns false.

Returns:
true if connected; false otherwise

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