| Home >> All >> com >> loihl >> [ sqltool Javadoc ] |
Source code: com/loihl/sqltool/QueryFactoryImpl.java
1 package com.loihl.sqltool; 2 3 import java.rmi.Naming; 4 import java.rmi.RemoteException; 5 import java.rmi.server.UnicastRemoteObject; 6 7 /** 8 * @author Robert J. Loihl 9 * @version 0.5.0 10 */ 11 public class QueryFactoryImpl extends UnicastRemoteObject 12 implements QueryFactory { 13 /** 14 * @label Manufactures 15 * @clientCardinality 1 16 * @supplierCardinality * 17 * @directed 18 **/ 19 /*#QueryImpl lnkQuery;*/ 20 //Member Methods 21 /** 22 * Method: QueryFactoryImpl 23 * Description: constructor for Query class 24 */ 25 public QueryFactoryImpl() throws RemoteException{ 26 super(); 27 } 28 public Query getQuery() throws RemoteException{ 29 //System.out.println("Getting new QueryImpl"); 30 QueryImpl queryRef = new QueryImpl(); 31 //System.out.println("Returning Query"); 32 return queryRef; 33 } 34 public static void main(String[] args) throws Exception { 35 //create the servant instance for registration 36 QueryFactoryImpl queryFactoryRef = new QueryFactoryImpl(); 37 //bind the object to the rmiregistry 38 Naming.rebind("RemoteQueryFactory", queryFactoryRef); 39 System.out.println("Query object ready and bound to the name 'RemoteQueryFactory'!"); 40 } 41 42 43 }