1 package org.objectweb.celtix.tools.extensions.jms; 2 3 import java.io.*; 4 import javax.wsdl.extensions.ExtensibilityElement; 5 import javax.xml.namespace.QName ; 6 import org.w3c.dom.*; 7 8 public class JMSAddress implements ExtensibilityElement, Serializable { 9 private String address; 11 private Element element; 12 private boolean required; 13 private QName elementType; 14 private String documentBaseURI; 15 16 private String destinationStyle = "queue"; 18 private String initialContextFactory = "org.activemq.jndi.ActiveMQInitialContextFactory"; 19 private String jndiConnectionFactoryName = "ConnectionFactory"; 20 private String messageType = "text"; 21 22 private String jndiProviderURL; 23 private String jndiDestinationName; 24 private String durableSubscriberName; 25 private boolean useMessageIDAsCorrelationID = true; 26 27 public void setDocumentBaseURI(String baseURI) { 28 this.documentBaseURI = baseURI; 29 } 30 31 public String getDocumentBaseURI() { 32 return this.documentBaseURI; 33 } 34 35 public void setElement(Element elem) { 36 this.element = elem; 37 } 38 39 public Element getElement() { 40 return element; 41 } 42 43 public void setRequired(Boolean r) { 44 this.required = r; 45 } 46 47 public Boolean getRequired() { 48 return required; 49 } 50 51 public void setElementType(QName elemType) { 52 this.elementType = elemType; 53 } 54 55 public QName getElementType() { 56 return elementType; 57 } 58 59 public void setJndiProviderURL(String url) { 60 this.jndiProviderURL = url; 61 } 62 63 public String getJndiProviderURL() { 64 return this.jndiProviderURL; 65 } 66 67 public String getDestinationStyle() { 68 return destinationStyle; 69 } 70 71 public String getDurableSubscriberName() { 72 return durableSubscriberName; 73 } 74 75 public void setDurableSubscriberName(String newDurableSubscriberName) { 76 durableSubscriberName = newDurableSubscriberName; 77 } 78 79 public String getInitialContextFactory() { 80 return initialContextFactory; 81 } 82 83 public void setInitialContextFactory(String newInitContextFactory) { 84 initialContextFactory = newInitContextFactory; 85 } 86 87 public String getJndiConnectionFactoryName() { 88 return jndiConnectionFactoryName; 89 } 90 91 public void setJndiConnectionFactoryName(String newJndiConnectionFactoryName) { 92 jndiConnectionFactoryName = newJndiConnectionFactoryName; 93 } 94 95 public String getJndiDestinationName() { 96 return jndiDestinationName; 97 } 98 99 public void setJndiDestinationName(String newJndiDestinationName) { 100 jndiDestinationName = newJndiDestinationName; 101 } 102 103 public String getMessageType() { 104 return messageType; 105 } 106 107 public void setMessageType(String newMessageType) { 108 messageType = newMessageType; 109 } 110 111 public boolean isUseMessageIDAsCorrelationID() { 112 return useMessageIDAsCorrelationID; 113 } 114 115 public void setUseMessageIDAsCorrelationID(boolean newUseMessageIDAsCorrelationID) { 116 useMessageIDAsCorrelationID = newUseMessageIDAsCorrelationID; 117 } 118 119 public void setDestinationStyle(String newDestinationStyle) { 120 destinationStyle = newDestinationStyle; 121 } 122 123 public String getAddress() { 124 return address; 125 } 126 127 public void setAddress(String newAddress) { 128 address = newAddress; 129 } 130 131 public String getAttrXMLString() { 132 StringBuffer sb = new StringBuffer (300); 133 if (destinationStyle != null) { 134 sb.append("destinationStyle=\"" + destinationStyle + "\" "); 135 } 136 if (initialContextFactory != null) { 137 sb.append("initialContextFactory=\"" + initialContextFactory + "\" "); 138 } 139 if (jndiConnectionFactoryName != null) { 140 sb.append("jndiConnectionFactoryName=\"" + jndiConnectionFactoryName + "\" "); 141 } 142 if (messageType != null) { 143 sb.append("messageType=\"" + messageType + "\" "); 144 } 145 if (jndiProviderURL != null) { 146 sb.append("jndiProviderURL=\"" + jndiProviderURL + "\" "); 147 } 148 if (jndiDestinationName != null) { 149 sb.append("jndiDestinationName=\"" + jndiDestinationName + "\" "); 150 } 151 if (durableSubscriberName != null) { 152 sb.append("durableSubscriberName=\"" + durableSubscriberName + "\" "); 153 } 154 sb.append("useMessageIDAsCorrelationID=\"" + String.valueOf(useMessageIDAsCorrelationID) + "\" "); 155 156 return sb.toString(); 157 } 158 } 159 | Popular Tags |