类 ConnectionEvent

java.lang.Object
java.util.EventObject
weka.gui.sql.event.ConnectionEvent
所有已实现的接口:
Serializable

public class ConnectionEvent extends EventObject
An event that is generated when a connection is established or dropped.
版本:
$Revision: 1.2 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 字段详细资料

    • CONNECT

      public static final int CONNECT
      it was a connect try
      另请参阅:
    • DISCONNECT

      public static final int DISCONNECT
      it was a disconnect
      另请参阅:
  • 构造器详细资料

    • ConnectionEvent

      public ConnectionEvent(Object source, int type, DbUtils utils)
      constructs the event
      参数:
      source - the source that generated this event
      type - whether CONNECT or DISCONNECT happened
      utils - the DatabaseUtils isntance responsible for the connection
    • ConnectionEvent

      public ConnectionEvent(Object source, int type, DbUtils utils, Exception ex)
      constructs the event
      参数:
      source - the source that generated this event
      type - whether CONNECT or DISCONNECT happened
      utils - the DatabaseUtils isntance responsible for the connection
      ex - a possible exception, if not successful
  • 方法详细资料

    • getType

      public int getType()
      returns the type of this event, CONNECT or DISCONNECT
      返回:
      the type of this event
      另请参阅:
    • failed

      public boolean failed()
      whether an exception happened and is stored
      返回:
      whether an exception happened
    • isConnected

      public boolean isConnected()
      returns whether the connection is still open.
      返回:
      whether the connection is still open
    • getException

      public Exception getException()
      returns the stored exception, if any (can be NULL)
    • getDbUtils

      public DbUtils getDbUtils()
      returns the DbUtils instance that is responsible for the connect/disconnect.
      返回:
      the responsible DbUtils instance
    • toString

      public String toString()
      returns the event in a string representation
      覆盖:
      toString 在类中 EventObject
      返回:
      the event in a string representation