1 55 package org.jboss.axis.components.net; 56 57 import org.jboss.axis.AxisProperties; 58 import org.jboss.logging.Logger; 59 60 import java.util.HashMap ; 61 62 63 66 public class TransportClientPropertiesFactory 67 { 68 private static Logger log = Logger.getLogger(SocketFactoryFactory.class.getName()); 69 70 private static HashMap cache = new HashMap (); 71 private static HashMap defaults = new HashMap (); 72 73 static 74 { 75 defaults.put("http", DefaultHTTPTransportClientProperties.class); 76 defaults.put("https", DefaultHTTPSTransportClientProperties.class); 77 } 78 79 public static TransportClientProperties create(String protocol) 80 { 81 TransportClientProperties tcp = 82 (TransportClientProperties)cache.get(protocol); 83 84 if (tcp == null) 85 { 86 tcp = (TransportClientProperties) 87 AxisProperties.newInstance(TransportClientProperties.class, 88 (Class )defaults.get(protocol)); 89 90 if (tcp != null) 91 { 92 cache.put(protocol, tcp); 93 } 94 } 95 96 return tcp; 97 } 98 } 99 | Popular Tags |