1 14 15 package org.quickserver.util.xmlreader; 16 17 23 public class ServerMode implements java.io.Serializable { 24 private boolean blocking = true; 25 26 30 public boolean getBlocking() { 31 return blocking; 32 } 33 34 40 public void setBlocking(boolean blocking) { 41 this.blocking = blocking; 42 } 43 44 47 public String toXML(String pad) { 48 if(pad==null) pad=""; 49 StringBuffer sb = new StringBuffer (); 50 sb.append(pad+"<server-mode>\n"); 51 sb.append(pad+"\t<blocking>"+getBlocking()+"</blocking>\n"); 52 sb.append(pad+"</server-mode>\n"); 53 return sb.toString(); 54 } 55 56 public String toString() { 57 if(getBlocking()) 58 return "Blocking"; 59 else 60 return "Non-Blocking"; 61 } 62 } 63 | Popular Tags |