All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PREDATOR.ServerErrorBuffer

java.lang.Object
   |
   +----PREDATOR.ServerErrorBuffer

public class ServerErrorBuffer
extends Object
The ServerErrorBuffer is the error buffer between the ErrorReader thread and the main thread operating the Connection object. It provides the means for the ErrorReader thread to read in the (essentially) asynchronous server errors and allow the Connection object to present them synchronously.

See Also:
ErrorReader, Connection

Variable Index

 o EMPTY
If the status variable has this value, then the server indicated that no error occurred during the query.
 o error
The error buffer
 o FULL
If the status variable has this value, then the server indicated that an error occurred during the query.
 o status
A status code, indicating if an error has been received or not.
 o WAITING
If the status variable has this value, then the the server has not yet communicated the error status.

Constructor Index

 o ServerErrorBuffer()

Method Index

 o clear()
Resets this buffer to be empty, without any error information.
 o complete()
Waits until this error buffer is filled (with an error or an A-OK signal).
 o getError()
If an error exists, returns the error and clears the error buffer.
 o isError()
Checks to see if there is a pending server error.
 o noError()
Signals that no error occurred during a query.
 o noteError(ServerError)
Places an error in the buffer, replacing any error already buffered.
 o reset()
Resets this buffer to be empty, without any error information, and waiting for an error (or an A-OK) signal to be sent.

Variables

 o error
 protected ServerError error
The error buffer

 o status
 protected int status
A status code, indicating if an error has been received or not.

 o EMPTY
 protected static final int EMPTY
If the status variable has this value, then the server indicated that no error occurred during the query.

 o FULL
 protected static final int FULL
If the status variable has this value, then the server indicated that an error occurred during the query.

 o WAITING
 protected static final int WAITING
If the status variable has this value, then the the server has not yet communicated the error status.

Constructors

 o ServerErrorBuffer
 public ServerErrorBuffer()

Methods

 o reset
 public synchronized void reset()
Resets this buffer to be empty, without any error information, and waiting for an error (or an A-OK) signal to be sent.

 o clear
 public synchronized void clear()
Resets this buffer to be empty, without any error information.

 o complete
 public synchronized void complete()
Waits until this error buffer is filled (with an error or an A-OK signal).

 o isError
 public synchronized boolean isError()
Checks to see if there is a pending server error.

Returns:
true if the server has registered an error, false otherwise
 o getError
 public synchronized ServerError getError()
If an error exists, returns the error and clears the error buffer. If none exists, returns null.

Returns:
The server error
 o noteError
 public synchronized void noteError(ServerError E)
Places an error in the buffer, replacing any error already buffered.

 o noError
 public synchronized void noError()
Signals that no error occurred during a query.


All Packages  Class Hierarchy  This Package  Previous  Next  Index