[Pfc-prolog-cvs] prolix/src/org/asturlinux/frade/prolix/consoleclient ConsoleClient.java,1.11,1.12
Status: Beta
Brought to you by:
ivanfrade
From: <iva...@us...> - 2003-08-06 21:22:04
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv23458 Modified Files: ConsoleClient.java Log Message: Updated console client to refactored server Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ConsoleClient.java 2 Aug 2003 20:29:17 -0000 1.11 --- ConsoleClient.java 6 Aug 2003 21:22:01 -0000 1.12 *************** *** 39,43 **** public class ConsoleClient { ! private ProlixMain interpreter; public static void main(String args[]) { --- 39,44 ---- public class ConsoleClient { ! private StudentRole interpreter; ! private CommonUseCase login; public static void main(String args[]) { *************** *** 54,60 **** // Obtain reference to home InitialContext ctx = new InitialContext(); ! ProlixMainHome home = (ProlixMainHome)ctx.lookup(ProlixMainHome.JNDI_NAME); // Create the interpreter bean ! interpreter = home.create(); } catch (NamingException ne) --- 55,63 ---- // Obtain reference to home InitialContext ctx = new InitialContext(); ! CommonUseCaseHome home = (CommonUseCaseHome)ctx.lookup(CommonUseCaseHome.JNDI_NAME); // Create the interpreter bean ! login = home.create(); ! //login = CommonUseCaseUtil.getHome().create(); ! interpreter = login.getStudentRole(); } catch (NamingException ne) *************** *** 133,137 **** try { ! String input = new String(in.readLine()); interpreter.loadProgram(input); } --- 136,142 ---- try { ! //String input = new String(in.readLine()); ! System.out.println("now hardcoded program"); ! String input = new String("aosidfjoasidjf"); interpreter.loadProgram(input); } *************** *** 280,284 **** System.out.println("Write your password: "); String pwd = new String(in.readLine()); ! interpreter.login(id,pwd); } catch (IOException io) --- 285,289 ---- System.out.println("Write your password: "); String pwd = new String(in.readLine()); ! login.login(id,pwd); } catch (IOException io) *************** *** 296,300 **** try { ! interpreter.logout(); } catch (NoLoggedUserException nlue) --- 301,305 ---- try { ! login.logout(); } catch (NoLoggedUserException nlue) |