1 23 24 package com.sun.enterprise.admin.common; 25 26 import java.io.Serializable ; 27 import java.util.Properties ; 28 29 import com.sun.enterprise.admin.util.ArgChecker; 30 import com.sun.enterprise.admin.util.StringValidator; 31 32 39 40 public class JMSDestinationInfo implements Serializable 41 { 42 private String destName, 43 destType; 44 private Properties attrs; 45 46 public JMSDestinationInfo (String destName, String destType) 47 { 48 ArgChecker.checkValid(destName, "destName", 49 StringValidator.getInstance()); ArgChecker.checkValid(destType, "destType", 51 StringValidator.getInstance()); 53 this.destName = destName; 54 this.destType = destType; 55 this.attrs = new Properties (); 56 } 57 58 public JMSDestinationInfo (String destName, String destType, Properties attrs) 59 { 60 this(destName, destType); 61 ArgChecker.checkValid(attrs, "attrs"); this.attrs = attrs; 63 } 64 65 public String getDestinationName() { 66 return (destName); 67 } 68 69 public String getDestinationType() { 70 return (destType); 71 } 72 73 public Properties getAttrs() { 74 return (attrs); 75 } 76 77 public String toString() { 78 StringBuffer sb = new StringBuffer (); 79 sb.append(destName); 80 sb.append(' '); 81 sb.append(destType); 82 sb.append(' '); 83 sb.append(attrs); 84 return sb.toString(); 85 } 86 } 87 | Popular Tags |