From ab841adc06acd2a6ff161ea866579674ce5ff99e Mon Sep 17 00:00:00 2001 From: guest Date: Wed, 24 Sep 2008 20:38:37 +0000 Subject: added YalpServer InputPluginHandling (incomplete) git-svn-id: http://manut.eu/svn/yalp/trunk@5 f059d3a0-6783-47b7-97ff-1fe0bbf25129 --- src/YalpServer/InitServer.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/YalpServer/InitServer.java') diff --git a/src/YalpServer/InitServer.java b/src/YalpServer/InitServer.java index a5f7c99..3e77ea5 100755 --- a/src/YalpServer/InitServer.java +++ b/src/YalpServer/InitServer.java @@ -52,12 +52,15 @@ import YalpInterfaces.*; public class InitServer { - private ServerSettings settings = new ServerSettings(); + private static ServerSettings settings = new ServerSettings(); + public static InputPluginHandler inputHandler = new InputPluginHandler(); + private ServerControlImpl srvCon; private ServerControlInterface srv; private ORB orb; private String[] orbArgs; private POA poa; + private String serverIP; /* @@ -94,12 +97,13 @@ public class InitServer { System.out.println("poa inactive"); } - this.srvCon = new ServerControlImpl(); - this.srvCon.setORB(this.orb); + srvCon = new ServerControlImpl(); + srvCon.setORB(orb); + srvCon.init(this); try { - org.omg.CORBA.Object ref = poa.servant_to_reference(this.srvCon); - this.srv = ServerControlInterfaceHelper.narrow(ref); + org.omg.CORBA.Object ref = poa.servant_to_reference(srvCon); + srv = ServerControlInterfaceHelper.narrow(ref); org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); @@ -107,10 +111,10 @@ public class InitServer { NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); String name = "YALP_Server"; NameComponent path[] = ncRef.to_name(name); - ncRef.rebind(path, this.srv); + ncRef.rebind(path, srv); System.out.println("YALP Server ready"); - this.orb.run(); + orb.run(); } catch( org.omg.CosNaming.NamingContextPackage.InvalidName e) { /* t.b.d. error handling */ -- cgit v1.2.3