1 package org.jacorb.imr; 2 22 23 import org.omg.CORBA.ORB ; 24 25 34 35 public class ImRHostInfo 36 implements java.io.Serializable 37 { 38 protected String host; 39 40 private ServerStartupDaemon ssd_ref; 41 private String object_string; 42 43 private boolean reconnect = false; 44 45 51 52 public ImRHostInfo(HostInfo host) 53 { 54 this.host = host.name; 55 ssd_ref = host.ssd_ref; 56 object_string = host.ior_string; 57 } 58 59 64 65 public HostInfo toHostInfo() 66 { 67 return new HostInfo(host, null, object_string); 69 } 70 71 80 81 public void startServer(String command, ORB orb) 82 throws ServerStartupFailed 83 { 84 if (reconnect) 85 ssd_ref = ServerStartupDaemonHelper.narrow(orb.string_to_object(object_string)); 86 87 ssd_ref.start_server(command); 88 } 89 90 93 94 private void writeObject(java.io.ObjectOutputStream out) 95 throws java.io.IOException 96 { 97 reconnect = true; out.defaultWriteObject(); 99 } 100 } 102 103 | Popular Tags |