1 21 package fr.dyade.aaa.agent; 22 23 import java.io.*; 24 25 28 public final class ServiceDesc implements Serializable { 29 30 transient String scname; 31 32 33 transient String args; 34 35 36 transient boolean initialized; 37 38 39 transient boolean running; 40 41 47 public ServiceDesc(String scname, 48 String args) { 49 this.scname = scname; 50 this.args = args; 51 this.initialized = false; 52 this.running = false; 53 } 54 55 private void writeObject(java.io.ObjectOutputStream out) 56 throws IOException { 57 out.writeUTF(scname); 58 if (args != null) 59 out.writeUTF(args); 60 else 61 out.writeUTF(""); 62 out.writeBoolean(initialized); 63 } 64 65 private void readObject(java.io.ObjectInputStream in) 66 throws IOException, ClassNotFoundException { 67 scname = in.readUTF(); 68 args = in.readUTF(); 69 if (args.length() == 0) 70 args = null; 71 initialized = in.readBoolean(); 72 running = false; 73 } 74 75 80 public String getClassName() { 81 return scname; 82 } 83 84 89 public String getArguments() { 90 return args; 91 } 92 93 98 public boolean isInitialized() { 99 return initialized; 100 } 101 102 107 public boolean isRunning() { 108 return running; 109 } 110 111 116 public String toString() { 117 StringBuffer strBuf = new StringBuffer (); 118 strBuf.append("(").append(super.toString()); 119 strBuf.append(",scname=").append(scname); 120 strBuf.append(",args=").append(args); 121 strBuf.append(",initialized=").append(initialized); 122 strBuf.append(",running=").append(running); 123 strBuf.append(")"); 124 return strBuf.toString(); 125 } 126 } 127 | Popular Tags |