borland Packages Class Hierarchy datastore.jdbc Package
java.lang.Object +----java.lang.Thread +----com.borland.datastore.jdbc.DataStoreServer
Variables Constructors Properties Methods
Implements Designable, Runnable
DataStoreServer is a thread that listens on a given port number for requests from the remote DataStore JDBC driver. Upon accepting a request, a connection is created that will service any further requests from that remote JDBC driver. This thread is the core of a DataStore JDBC server.
The server creates a ServerConnection object to represent each new connection. Objects that implement ServerStatusListener may register with the server to be notified when connections are made, connections are broken (disconnected), and when errors occur. You can control which types of events are reported.
Because access to a physical DataStore file is restricted to a single process, you must create your own custom DataStore server application if you want to add functionality. For example, in addition to servicing remote JDBC requests, you could have your server make backups at the same time every night. Another example would be if you want to access serialized file streams in the same DataStore file; these streams are not accessible through JDBC, but you could add that functionality through the DataStore API to your custom DataStore server.
public static final int DEFAULT_PORT = 2508The default port number for a JDBC remote driver.
public DataStoreServer()Creates a new DataStoreServer instance, which starts a thread that listens for activity on the default port.
public int getPort() public void setPort(int port)The port on which to listen for JDBC requests. If not set, DataStoreServer.DEFAULT_PORT is used.
public final boolean isReportConnect() public final void setReportConnect(boolean set)Determines whether connections and disconnections are reported to registered ServerStatusListeners or ignored.
public final boolean isReportConnectError() public final void setReportConnectError(boolean set)Determines whether errors regarding the instantiation, connection, or disconnection of ServerConnection objects are reported to registered ServerStatusListeners or ignored.
public final boolean isReportServerError() public final void setReportServerError(boolean set)Determines whether (fatal) server errors are reported to registered ServerStatusListeners or ignored.
public final Vector getServerConnections()Returns a list of current connections, represented by ServerConnection objects.
public String getTempDir() public void setTempDir(String tempDir)The temporary directory for all DataStore connections. If null, the current directory is used.
public final void addServerStatusListener(ServerStatusListener listener)
public final void closeConnections()Close all ServerConnection instances initiated by this instance of DataStoreServer.
public final void removeServerStatusListener(ServerStatusListener listener)
public final void shutdown()Causes the DataStoreServer thread to terminate and close all ServerConnection instances initiated by this DataStoreServer instance.