1 19 package org.netbeans.modules.websvc.wsitmodelext.transport; 20 21 import javax.xml.namespace.QName ; 22 import java.util.HashSet ; 23 import java.util.Set ; 24 25 29 public enum TCPQName { 30 OPTIMIZEDTCPTRANSPORT(createTCPQName("OptimizedTCPTransport")), AUTOMATICALLYSELECTOPTIMALTRANSPORT(createTCPClientQName("AutomaticallySelectOptimalTransport")); 33 public static final String TCP_NS_URI = "http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp/service"; public static final String TCP_CLIENT_NS_URI = "http://java.sun.com/xml/ns/wsit/2006/09/policy/transport/client"; public static final String TCP_NS_PREFIX = "tcp"; 37 public static QName createTCPQName(String localName){ 38 return new QName (TCP_NS_URI, localName, TCP_NS_PREFIX); 39 } 40 41 public static QName createTCPClientQName(String localName){ 42 return new QName (TCP_CLIENT_NS_URI, localName, TCP_NS_PREFIX); 43 } 44 45 TCPQName(QName name) { 46 qName = name; 47 } 48 49 public QName getQName(){ 50 return qName; 51 } 52 private static Set <QName > qnames = null; 53 public static Set <QName > getQNames() { 54 if (qnames == null) { 55 qnames = new HashSet <QName >(); 56 for (TCPQName wq : values()) { 57 qnames.add(wq.getQName()); 58 } 59 } 60 return qnames; 61 } 62 private final QName qName; 63 64 } 65 | Popular Tags |