Package adams.event
Class DatabaseConnectionChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- javax.swing.event.ChangeEvent
-
- adams.event.DatabaseConnectionChangeEvent
-
- All Implemented Interfaces:
Serializable
public class DatabaseConnectionChangeEvent extends ChangeEvent
Whenever a change in the database connection (connect/disconnect) happens, the listeners get notified with this event.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDatabaseConnectionChangeEvent.EventTypeEnum for the type of event.
-
Field Summary
Fields Modifier and Type Field Description protected DatabaseConnectionChangeEvent.EventTypem_Typethe type of event.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description DatabaseConnectionChangeEvent(Object source, DatabaseConnectionChangeEvent.EventType type)Initializes the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractDatabaseConnectiongetDatabaseConnection()Returns the database connection object that triggered the event.DatabaseConnectionChangeEvent.EventTypegetType()The type of event.StringtoString()Returns the event as string.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
m_Type
protected DatabaseConnectionChangeEvent.EventType m_Type
the type of event.
-
-
Constructor Detail
-
DatabaseConnectionChangeEvent
public DatabaseConnectionChangeEvent(Object source, DatabaseConnectionChangeEvent.EventType type)
Initializes the event.- Parameters:
source- the database connection objecttype- the type of event
-
-
Method Detail
-
getDatabaseConnection
public AbstractDatabaseConnection getDatabaseConnection()
Returns the database connection object that triggered the event.- Returns:
- the responsible object
-
getType
public DatabaseConnectionChangeEvent.EventType getType()
The type of event.- Returns:
- the type
-
toString
public String toString()
Returns the event as string.- Overrides:
toStringin classEventObject- Returns:
- a string representation of the event
-
-