1 22 package org.jboss.jms.jndi; 23 24 import java.io.Serializable ; 25 import java.util.Properties ; 26 27 39 public abstract class AbstractJMSProviderAdapter implements JMSProviderAdapter, Serializable 40 { 41 private static final long serialVersionUID = 3573606612665654983L; 42 43 44 protected String name; 45 46 47 protected Properties properties; 48 49 50 protected String factoryRef; 51 52 53 protected String queueFactoryRef; 54 55 56 protected String topicFactoryRef; 57 58 public void setName(final String name) 59 { 60 this.name = name; 61 } 62 63 public final String getName() 64 { 65 return name; 66 } 67 68 public void setProperties(final Properties properties) 69 { 70 this.properties = properties; 71 } 72 73 public final Properties getProperties() 74 { 75 return properties; 76 } 77 78 public String getFactoryRef() 79 { 80 if (factoryRef == null) 81 throw new IllegalStateException ("Combined ConnectionFactory 'FactoryRef' not configured."); 82 return factoryRef; 83 } 84 85 public String getQueueFactoryRef() 86 { 87 if (queueFactoryRef == null) 88 throw new IllegalStateException ("Queue ConnectionFactory 'QueueFactoryRef' not configured."); 89 return queueFactoryRef; 90 } 91 92 public String getTopicFactoryRef() 93 { 94 if (topicFactoryRef == null) 95 throw new IllegalStateException ("Topic ConnectionFactory 'TopicFactoryRef' not configured."); 96 return topicFactoryRef; 97 } 98 99 public void setFactoryRef(String newFactoryRef) 100 { 101 factoryRef = newFactoryRef; 102 } 103 104 public void setQueueFactoryRef(String newQueueFactoryRef) 105 { 106 queueFactoryRef = newQueueFactoryRef; 107 } 108 109 public void setTopicFactoryRef(String newTopicFactoryRef) 110 { 111 topicFactoryRef = newTopicFactoryRef; 112 } 113 } | Popular Tags |