borland Packages Class Hierarchy dx.dataset Package
java.lang.Object +----java.util.EventObject +----com.borland.jb.util.DispatchableEvent +----com.borland.dx.dataset.ResponseEvent
Variables Constructors Properties Methods
Implements Serializable
The ResponseEvent
class is used for collecting a response from an application about how to deal with error conditons, table restructuring operations, key violations, etc.
public static final int CANCEL = 2Response code requesting that the operation be cancelled.
public static final int COMMIT_ON_CLOSE = 12
DataStoreConnection
is closing and the current transaction is about to be committed.
ok()
to proceed with the commit()
.
cancel()
to cause rollback()
to be called on the connection.
public static final int DATASTORE_ALREADY_OPEN = 5The
DataStore
appears to already be open by this process or another process.
Call ok()
to attempt to determine if the DataStore
is really still open.
If it is determined that the DataStore
is not open, a DATASTORE_CAN_REOPEN ResponseEvent
is sent, and the the open process continues. Call cancel()
to cause this open operation to fail.
public static final int DATASTORE_CAN_REOPEN = 6The
DataStore
was left open, but the process that had it open has terminated. This message comes after DATASTORE_ALREADY_OPEN
. Call ok()
to continue the DataStore
open operation. Call cancel()
to cause this open operation to fail.
public static final int DATASTORE_RECOVERING = 11The
DataStore.shutdown()
method was not called for the source DataStore
by the last process that accessed it. This notification comes just before the system attempts to recover. Call ok()
to proceed with recovery. Call cancel()
to cause this operation to fail.
public static final int DROP_LOG = 10A
DataStore
log file is about to be deleted because it is no longer needed for any active transaction or for crash recovery. This will be called for the "A" log files, "B" log files (if the log is being duplexed), and status log files (if status logging is enabled). Call the ok()
method if you have deleted the file so that the operation can continue. Call the cancel()
method to cause this operation to fail.
public static final int FILE_EXISTS = 9
Operation cannot continue because the file name in the message already exists. Call ok()
if you have deleted the file so that the operation can continue. Call cancel()
to cause this operation to fail.
public static final int IGNORE_ALL = 3Response code requesting that any more error/response requests of this code should be ignored for the duration of this operation.
public static final int IOEXCEPTION = 7The
DataStore
sends this response out whenever there is a read or write failure. A common source for this response event would be when there is insufficient disk space to increase the size of the DataStore
file when needed. The source
of the error is set to the DataStore
instance and exception is set to the IOException
that was encountered. Call ok()
to have the I/O operation retried. Call cancel()
to cause this operation to fail.
public static final int OK = 1Response code requesting that the operation be continued.
public static final int READ_ONLY_OPEN = 13The
DataStore
file cannot be opened. An attempt to open the file in read-only mode is about to be made.
ok()
to proceed open the file in readOnly
mode.
cancel()
to fail to open the file and to throw an exception.
public static final int TYPE_CHANGE_DATA_LOSS = 1The restructure operation is converting data from one type to another. Old values will not be converted to the new data type.
ok()
to continue.
cancel()
to abort.
ignoreAll()
to continue and ignore any future messages of this type.
public static final int TYPE_CHANGE_PARSE_ERROR = 3The restructure operation is converting data from one type to another. A parse error occurred while converting a String data type to a non-String data type.
ok()
to continue.
cancel()
to abort.
ignoreAll()
to continue and ignore any future messages of this type.
public static final int TYPE_CHANGE_PARSE_ERROR_TOTAL = 4The restructure operation encountered one or more
TYPE_CHANGE_PARSE_ERROR
occurrances. The error is sent out just before the restructure operation is about to be committed.
ok()
to continue.
cancel()
to abort the restructure operation.
ignoreAll()
to continue and ignore any future messages of this type.
public static final int TYPE_CHANGE_PRECISION_LOSS = 2The restructure operation is converting data from one type to another. This conversion might result in a loss of precision when values of the old data type are converted to values of the new data type.
ok()
to continue.
cancel()
to abort the restructure operation.
ignoreAll()
to continue and ignore any future messages of this type.
public static final int XA_PREPARE_CLOSE = 15null
See also: ResponseEvent.XA_START_CLOSE
public static final int XA_START_CLOSE = 14null
See also: ResponseEvent.XA_PREPARE_CLOSE
public ResponseEvent(Object source, int code, Exception ex)Constructs a
ResponseEvent
object.
source
ResponseEvent
.
code
ResponseEvent
variables.
ex
public ResponseEvent(Object source, int code, String message)Constructs a
ResponseEvent
object.
source
ResponseEvent
.
code
ResponseEvent
variables.
message
public final boolean isCancel()Read-only property that returns true if the response is
CANCEL
.
public final int getCode()Read-only property that returns the code value of the
ResponseEvent
. See code constants listed under ResponseEvent
variables.
public final Exception getException()Returns an
Exception
if set. Otherwise this method returns null.
public final boolean isIgnoreAll()Read-only property that returns true if the response is
IGNORE_ALL
.
public final String getMessage()Read-only property that returns String information on what needs to be responded to.
public final boolean isOk()Read-only property that returns true if response is
OK
.
public final int getResponse()Read-only property that returns the response setting of
OK
or CANCEL
.
public final void cancel()Fails the operation. An
Exception
may be thrown to cancel the operation.
public void dispatch(EventListener listener)
This method is an implementation of DispatchableEvent
that an EventMulticaster
uses to dispatch an event of this type to the listener
.
listener
com.borland.jb.util.DispatchableEvent
, com.borland.jb.util.EventMulticaster
public final void ignoreAll()Causes all future errors/response requests with this event's code to be ignored. The operation then continues, if possible.
public final void ok()Acknowledges receipt of the
ResponseEvent
.
The operation then continues, if possible.