1 package org.objectweb.celtix.performance.basic_type.server; 2 3 import javax.xml.ws.Endpoint; 4 5 import org.objectweb.celtix.Bus; 6 import org.objectweb.celtix.BusException; 7 8 public class Server implements Runnable { 9 10 Bus bus; 11 12 public Server(Bus b, String address) throws Exception { 13 System.out.println("Starting Server"); 14 bus = b; 15 Object implementor = new ServerImpl(); 16 Endpoint.publish(address, implementor); 17 System.out.println("Server published"); 18 } 19 20 public Server(String [] args) throws Exception { 21 this(Bus.init(args), "http://localhost:20000/performance/basic_type/SoapPort"); 22 } 23 24 public static void main(String args[]) throws Exception { 25 Server server = new Server(args); 26 server.run(); 27 } 28 29 public void run() { 30 System.out.println("running bus"); 31 System.out.println(" READY "); 32 bus.run(); 33 34 } 35 36 void shutdown(boolean wait) throws BusException { 37 System.out.println("shutting down bus"); 38 bus.shutdown(wait); 39 } 40 } 41 | Popular Tags |