activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1086829 - /activemq/activemq-apollo/trunk/apollo-transport/src/main/java/org/apache/activemq/apollo/transport/TransportFactorySupport.java
Date Wed, 30 Mar 2011 03:49:16 GMT
Author: chirino
Date: Wed Mar 30 03:49:15 2011
New Revision: 1086829

URL: http://svn.apache.org/viewvc?rev=1086829&view=rev
Log:
Protocol can be set after the transport is created.

Modified:
    activemq/activemq-apollo/trunk/apollo-transport/src/main/java/org/apache/activemq/apollo/transport/TransportFactorySupport.java

Modified: activemq/activemq-apollo/trunk/apollo-transport/src/main/java/org/apache/activemq/apollo/transport/TransportFactorySupport.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-transport/src/main/java/org/apache/activemq/apollo/transport/TransportFactorySupport.java?rev=1086829&r1=1086828&r2=1086829&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-transport/src/main/java/org/apache/activemq/apollo/transport/TransportFactorySupport.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-transport/src/main/java/org/apache/activemq/apollo/transport/TransportFactorySupport.java
Wed Mar 30 03:49:15 2011
@@ -33,8 +33,6 @@ public class  TransportFactorySupport {
 
 
     static public Transport configure(Transport transport, Map<String, String> options)
throws IOException {
-        ProtocolCodec wf = createProtocolCodec(options);
-        transport.setProtocolCodec(wf);
         IntrospectionSupport.setProperties(transport, options);
         return transport;
     }
@@ -51,51 +49,6 @@ public class  TransportFactorySupport {
         return transport;
     }
 
-    static public ProtocolCodec createProtocolCodec(Map<String, String> options) throws
IOException {
-        ProtocolCodecFactory.Provider factory = createProtocolCodecFactory(options);
-        if( factory == null ) {
-            return null;
-        }
-        ProtocolCodec protocolCodec = factory.createProtocolCodec();
-        return protocolCodec;
-    }
-
-    static public ProtocolCodecFactory.Provider createProtocolCodecFactory(Map<String,
String> options) throws IOException {
-        String protocolName = (String)options.remove("protocol");
-        if (protocolName == null) {
-            protocolName = getDefaultProtocolName();
-        }
-        if( "null".equals(protocolName) ) {
-            return null;
-        }
-        ProtocolCodecFactory.Provider provider = ProtocolCodecFactory.get(protocolName);
-        if( provider==null ) {
-            throw new IOException("Could not create protocol codec for: " + protocolName
);
-        }
-        
-        return provider;
-    }
-
-    static public ProtocolCodecFactory.Provider createProtocolCodecFactory(String location)
throws IOException, URISyntaxException {
-        URI uri = new URI(location);
-        Map<String, String> options = new HashMap<String, String>(URISupport.parseParamters(uri));
-
-        String protocolName = uri.getPath();
-        if( "null".equals(protocolName) ) {
-            return null;
-        }
-
-        ProtocolCodecFactory.Provider provider = ProtocolCodecFactory.get(protocolName);
-        if( provider==null ) {
-            throw new IOException("Could not create protocol codec for: " + protocolName);
-        }
-        return provider;
-    }
-
-    static protected String getDefaultProtocolName() {
-        return "stomp";
-    }
-
     @Override
     protected Object clone() throws CloneNotSupportedException {
         return super.clone();    //To change body of overridden methods use File | Settings
| File Templates.



Mime
View raw message