OpMath

com.opmath.util.db
Class DBRemoteObject

java.lang.Object
  |
  +--com.opmath.util.db.DBObject
        |
        +--com.opmath.util.db.DBRemoteObject
All Implemented Interfaces:
DB, DBRemote

public abstract class DBRemoteObject
extends DBObject
implements DBRemote

The superclass for implementations of the com.opmath.util.db.DBRemote interface.

This class implements instance variables and methods that are likely to be common to all implementations of com.opmath.util.db.DBRemote.

Copyright: (c) 2002 The Open Math Company Limited

The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.

Since:
J2SE 1.3.0
Version:
utilities-v011
Author:
Bruno Beloff bruno.beloff@opmath.com

Field Summary
protected  String host
          The name of the host for this DBRemote server.
 
Fields inherited from class com.opmath.util.db.DBObject
conn, path, protocol
 
Constructor Summary
DBRemoteObject()
           
 
Method Summary
 String getHost()
          Returns the host for the current connection.
static DB newDbConnection(String className, String path)
          Explicitly prohibited by this class.
static DBRemote newDbConnection(String className, String host, String path)
          A factory method for implementations of the DBRemote interface.
 
Methods inherited from class com.opmath.util.db.DBObject
className, create, createTable, delete, delete, dropTable, getConnection, getPath, getProtocol, isAvailable, maxIndex, query, read, read, readAll, update, update
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opmath.util.db.DB
className, close, connect, create, createTable, delete, delete, dropTable, getConnection, getDriver, getPath, getProtocol, isAvailable, maxIndex, query, read, read, readAll, update, update
 

Field Detail

host

protected String host

The name of the host for this DBRemote server.

Since:
J2SE 1.3
Constructor Detail

DBRemoteObject

public DBRemoteObject()
Method Detail

newDbConnection

public static DB newDbConnection(String className,
                                 String path)
                          throws UnsupportedOperationException

Explicitly prohibited by this class.

Throws:
UnsupportedOperationException - always.
Since:
J2SE 1.3
See Also:
DBObject.newDbConnection(String, String)

newDbConnection

public static DBRemote newDbConnection(String className,
                                       String host,
                                       String path)
                                throws ClassNotFoundException

A factory method for implementations of the DBRemote interface.

NOTE: This method can only construct DBRemote objects where a constructor of the form <ClassName>(String host, String path) is available.

Parameters:
className - a String the name of the class implementing DBRemote.
host - a String identifying the host.
path - a String specifying the absolute path, including the database file or directory.
Returns:
A new object implementing DBRemote.
Throws:
ClassNotFoundException - if it was not possible to construct the specified object.
Since:
J2SE 1.3

getHost

public String getHost()

Returns the host for the current connection. Returns null if there is no current connection.

Specified by:
getHost in interface DBRemote
Returns:
A String identifying the host.
Since:
J2SE 1.3

OpMath

Submit a bug or feature to Open Math
Copyright © 2002 Open Math Company Limited, Brighton, UK