|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
weka.gui.sql.event.ConnectionEvent
public class ConnectionEvent
An event that is generated when a connection is established or dropped.
ConnectionListener,
Serialized Form| Field Summary | |
|---|---|
static int |
CONNECT
it was a connect try |
static int |
DISCONNECT
it was a disconnect |
| Constructor Summary | |
|---|---|
ConnectionEvent(java.lang.Object source,
int type,
DbUtils utils)
constructs the event |
|
ConnectionEvent(java.lang.Object source,
int type,
DbUtils utils,
java.lang.Exception ex)
constructs the event |
|
| Method Summary | |
|---|---|
boolean |
failed()
whether an exception happened and is stored |
DbUtils |
getDbUtils()
returns the DbUtils instance that is responsible for the connect/disconnect. |
java.lang.Exception |
getException()
returns the stored exception, if any (can be NULL) |
int |
getType()
returns the type of this event, CONNECT or DISCONNECT |
boolean |
isConnected()
returns whether the connection is still open. |
java.lang.String |
toString()
returns the event in a string representation |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CONNECT
public static final int DISCONNECT
| Constructor Detail |
|---|
public ConnectionEvent(java.lang.Object source,
int type,
DbUtils utils)
source - the source that generated this eventtype - whether CONNECT or DISCONNECT happenedutils - the DatabaseUtils isntance responsible for the
connection
public ConnectionEvent(java.lang.Object source,
int type,
DbUtils utils,
java.lang.Exception ex)
source - the source that generated this eventtype - whether CONNECT or DISCONNECT happenedutils - the DatabaseUtils isntance responsible for the
connectionex - a possible exception, if not successful| Method Detail |
|---|
public int getType()
CONNECT,
DISCONNECTpublic boolean failed()
public boolean isConnected()
public java.lang.Exception getException()
public DbUtils getDbUtils()
public java.lang.String toString()
toString in class java.util.EventObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||