i-net JDBC drivers for MS SQL Server

com.inet.pool
Class FailoverEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.inet.pool.FailoverEvent
All Implemented Interfaces:
java.io.Serializable

public class FailoverEvent
extends java.util.EventObject

An FailoverEvent is received from a FailoverListener to indicate the current state of connection failover procedure.

See Also:
Serialized Form

Field Summary
static int FO_BEGIN
          indicates that failover has detected a lost connection and failover is starting.
static int FO_END
          indicates successful completion of failover.
static int FO_ERROR
          indicates that failover was temporarily unsuccessful, but it gives the application the opportunity to handle the error and retry failover.
 
Constructor Summary
FailoverEvent(java.lang.Object source, java.lang.Exception e)
          Constructs a FailoverEvent.
FailoverEvent(java.lang.Object source, int type)
          Constructs a FailoverEvent.
 
Method Summary
 int getEventType()
           
 java.lang.Exception getException()
          returns the Exception that was the reason of FO_ERROR.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FO_BEGIN

public static final int FO_BEGIN
indicates that failover has detected a lost connection and failover is starting.

See Also:
Constant Field Values

FO_END

public static final int FO_END
indicates successful completion of failover.

See Also:
Constant Field Values

FO_ERROR

public static final int FO_ERROR
indicates that failover was temporarily unsuccessful, but it gives the application the opportunity to handle the error and retry failover. The usual method of error handling is to issue sleep() and retry by returning true

See Also:
Constant Field Values
Constructor Detail

FailoverEvent

public FailoverEvent(java.lang.Object source,
                     int type)
Constructs a FailoverEvent.

Parameters:
type -
source - The object on which the Event initially occurred.
Throws:
java.lang.IllegalArgumentException - if source is null. There are 2 possible failover event types.
See Also:
FO_BEGIN, FO_END

FailoverEvent

public FailoverEvent(java.lang.Object source,
                     java.lang.Exception e)
Constructs a FailoverEvent.

Parameters:
source - The object on which the Event initially occurred.
e - the Exception occurred during the try of restore the Connection.
Throws:
java.lang.IllegalArgumentException - if source is null. The set event type is FO_ERROR.
See Also:
FO_ERROR
Method Detail

getEventType

public int getEventType()
Returns:
Returns the event type.
See Also:
FO_BEGIN, FO_END, FO_ERROR

getException

public java.lang.Exception getException()
returns the Exception that was the reason of FO_ERROR.

Returns:
the Exception occurred while the attempt of restoring the Connection.
See Also:
FO_ERROR

i-net JDBC drivers for MS SQL Server


copyright by i-net software