Class QueryServer

java.lang.Object
   |
   +----java.rmi.server.RemoteObject
           |
           +----java.rmi.server.RemoteServer
                   |
                   +----java.rmi.server.UnicastRemoteObject
                           |
                           +----QueryServer

public class QueryServer
extends UnicastRemoteObject
implements QueryInterface
The Server


Constructor Index

 o QueryServer(String)

Method Index

 o deleteFunction(String, Vector)
ReWrites the Client's Saved Query file from a Vector of "Spared queries".
 o getSavedList(String)
Returns Client's Saved Queries.
 o main(String[])
Writes necessary RMI code.
 o query(String)
The Main Functionality; Effecting the Query.
 o saveToList(String, String)
Saves SQL string to Client's Saved Query file.

Constructors

 o QueryServer
 public QueryServer(String s) throws RemoteException

Methods

 o getSavedList
 public Vector getSavedList(String cookie) throws RemoteException
Returns Client's Saved Queries. Server looks for a text file with the cookie name from a hardcoded directory, currently: "c:\Inetpub\wwwroot\PubTest\ClientQueries", Character tag '' used to separate queries (so that \n may be preserved in the orignial queries)

 o saveToList
 public String saveToList(String cookie,
                          String newSQL) throws RemoteException
Saves SQL string to Client's Saved Query file. Text file is written to or created in a hardcoded directory, currently: c:\Inetpub\wwwroot\PubTest\ClientQueries named with the cookie String. The end of queries are marked with the character tag ''

 o deleteFunction
 public String deleteFunction(String cookie,
                              Vector SparedItems) throws RemoteException
ReWrites the Client's Saved Query file from a Vector of "Spared queries". (Basically saveToList but adds more than one query and rewrites rather than appends to the file)

 o query
 public synchronized Return query(String SQLp) throws RemoteException
The Main Functionality; Effecting the Query. Creates an instance of SQLWrapper which it uses to Query the database. Adds multiple tables from the WebSite to the Oracle database (sendSQL), Queries the Oracle database (queryDB), and Creates a Table Model from the returned data. The SQLWrapper's ErrorSnitch is emptied, and those (possible) errors are returned with the Table Model to the client in the Return object.

 o main
 public static void main(String args[])
Writes necessary RMI code. Creates a registry on port 1099, binds the QueryServer and ErrorSnitch objects to the registry with the names "QueryServer" and "ErrorSnitch", and sets a Security Manager