1 26 27 package org.objectweb.benchmark.benchIce.latency; 28 29 36 public class Server 37 { 38 39 44 public static void main(String []args) 45 { 46 int status = 0; 47 Ice.Communicator ic = null; 48 49 try{ 50 ic = Ice.Util.initialize(args); 51 Ice.ObjectAdapter adapter = ic.createObjectAdapterWithEndpoints("SimplePrinterAdapter", 52 "default -p 10000"); 53 Ice.Object object = new PingImpl(ic); 54 adapter.add(object, Ice.Util.stringToIdentity("SimplePrinter")); 55 adapter.activate(); 56 ic.waitForShutdown(); 57 58 System.exit(0); 60 }catch(Ice.LocalException e){ 61 e.printStackTrace(); 62 } 63 64 } 65 66 } 67 | Popular Tags |