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 38 39 public class JMSObjectInfo implements Serializable 40 { 41 private String jndiName, 42 type; 43 private Properties attrs; 44 45 public JMSObjectInfo (String jndiName, String type) 46 { 47 ArgChecker.checkValid(jndiName, "jndiName", 48 StringValidator.getInstance()); ArgChecker.checkValid(type, "type", 50 StringValidator.getInstance()); 52 this.jndiName = jndiName; 53 this.type = type; 54 this.attrs = new Properties (); 55 } 56 57 public JMSObjectInfo (String jndiName, String type, Properties attrs) 58 { 59 this(jndiName, type); 60 ArgChecker.checkValid(attrs, "attrs"); this.attrs = attrs; 62 } 63 64 public String getJndiName() { 65 return (jndiName); 66 } 67 68 public String getType() { 69 return (type); 70 } 71 72 public Properties getAttrs() { 73 return (attrs); 74 } 75 76 public String toString() { 77 StringBuffer sb = new StringBuffer (); 78 sb.append(jndiName); 79 sb.append(' '); 80 sb.append(type); 81 sb.append(' '); 82 sb.append(attrs); 83 return sb.toString(); 84 } 85 } | Popular Tags |