qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1556873 [2/2] - in /qpid/trunk/qpid/java: ./ amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/ amqp-1-0-client-websocket/ amqp-1-0-client-websocket/resources/ amqp-1-0-client-websocket/src/ amqp-1-0-client-websocket/src/...
Date Thu, 09 Jan 2014 16:53:53 GMT
Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AmqpPortAdapter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AmqpPortAdapter.java?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AmqpPortAdapter.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/AmqpPortAdapter.java Thu Jan  9 16:53:51 2014
@@ -24,7 +24,6 @@ import static org.apache.qpid.transport.
 import java.net.InetSocketAddress;
 import java.security.GeneralSecurityException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Map;
@@ -47,16 +46,17 @@ import org.apache.qpid.server.model.Prot
 import org.apache.qpid.server.model.Transport;
 import org.apache.qpid.server.model.TrustStore;
 import org.apache.qpid.server.configuration.updater.TaskExecutor;
+import org.apache.qpid.server.plugin.QpidServiceLoader;
+import org.apache.qpid.server.plugin.TransportProviderFactory;
 import org.apache.qpid.server.protocol.AmqpProtocolVersion;
-import org.apache.qpid.server.protocol.MultiVersionProtocolEngineFactory;
-import org.apache.qpid.transport.NetworkTransportConfiguration;
-import org.apache.qpid.transport.network.IncomingNetworkTransport;
+import org.apache.qpid.server.transport.AcceptingTransport;
+import org.apache.qpid.server.transport.TransportProvider;
 import org.apache.qpid.transport.network.security.ssl.QpidMultipleTrustManager;
 
 public class AmqpPortAdapter extends PortAdapter
 {
     private final Broker _broker;
-    private IncomingNetworkTransport _transport;
+    private AcceptingTransport _transport;
 
     public AmqpPortAdapter(UUID id, Broker broker, Map<String, Object> attributes, Map<String, Object> defaultAttributes, TaskExecutor taskExecutor)
     {
@@ -70,42 +70,36 @@ public class AmqpPortAdapter extends Por
         Collection<Transport> transports = getTransports();
         Set<AmqpProtocolVersion> supported = convertFromModelProtocolsToAmqp(getProtocols());
 
-        SSLContext sslContext = null;
-        if (transports.contains(Transport.SSL))
+        TransportProvider transportProvider = null;
+        final HashSet<Transport> transportSet = new HashSet<Transport>(transports);
+        for(TransportProviderFactory tpf : (new QpidServiceLoader<TransportProviderFactory>()).instancesOf(TransportProviderFactory.class))
         {
-            sslContext = createSslContext();
+            if(tpf.getSupportedTransports().contains(transports))
+            {
+                transportProvider = tpf.getTransportProvider(transportSet);
+            }
         }
 
-        AmqpProtocolVersion defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();
-
-        String bindingAddress = (String) getAttribute(Port.BINDING_ADDRESS);
-        if (WILDCARD_ADDRESS.equals(bindingAddress))
+        if(transportProvider == null)
         {
-            bindingAddress = null;
+            throw new IllegalConfigurationException("No transport providers found which can satisfy the requirement to support the transports: " + transports);
         }
-        Integer port = (Integer) getAttribute(Port.PORT);
-        InetSocketAddress bindingSocketAddress = null;
-        if ( bindingAddress == null )
-        {
-            bindingSocketAddress = new InetSocketAddress(port);
-        }
-        else
+
+        SSLContext sslContext = null;
+        if (transports.contains(Transport.SSL))
         {
-            bindingSocketAddress = new InetSocketAddress(bindingAddress, port);
+            sslContext = createSslContext();
         }
 
-        final NetworkTransportConfiguration settings = new ServerNetworkTransportConfiguration(
-                bindingSocketAddress, (Boolean)getAttribute(TCP_NO_DELAY),
-                (Integer)getAttribute(SEND_BUFFER_SIZE), (Integer)getAttribute(RECEIVE_BUFFER_SIZE),
-                (Boolean)getAttribute(NEED_CLIENT_AUTH), (Boolean)getAttribute(WANT_CLIENT_AUTH));
+        AmqpProtocolVersion defaultSupportedProtocolReply = getDefaultAmqpSupportedReply();
 
-        _transport = org.apache.qpid.transport.network.Transport.getIncomingTransportInstance();
-        final MultiVersionProtocolEngineFactory protocolEngineFactory = new MultiVersionProtocolEngineFactory(
-                _broker, transports.contains(Transport.TCP) ? sslContext : null,
-                settings.wantClientAuth(), settings.needClientAuth(),
-                supported, defaultSupportedProtocolReply, this, transports.contains(Transport.TCP) ? Transport.TCP : Transport.SSL);
+        _transport = transportProvider.createTransport(transportSet,
+                                                       sslContext,
+                                                       this,
+                                                       supported,
+                                                       defaultSupportedProtocolReply);
 
-        _transport.accept(settings, protocolEngineFactory, transports.contains(Transport.TCP) ? null : sslContext);
+        _transport.start();
         for(Transport transport : getTransports())
         {
             CurrentActor.get().message(BrokerMessages.LISTENING(String.valueOf(transport), getPort()));
@@ -211,65 +205,6 @@ public class AmqpPortAdapter extends Por
         return null;
     }
 
-    class ServerNetworkTransportConfiguration implements NetworkTransportConfiguration
-    {
-        private final InetSocketAddress _bindingSocketAddress;
-        private final Boolean _tcpNoDelay;
-        private final Integer _sendBufferSize;
-        private final Integer _receiveBufferSize;
-        private final boolean _needClientAuth;
-        private final boolean _wantClientAuth;
-
-        public ServerNetworkTransportConfiguration(
-                InetSocketAddress bindingSocketAddress, boolean tcpNoDelay,
-                int sendBufferSize, int receiveBufferSize,
-                boolean needClientAuth, boolean wantClientAuth)
-        {
-            _bindingSocketAddress = bindingSocketAddress;
-            _tcpNoDelay = tcpNoDelay;
-            _sendBufferSize = sendBufferSize;
-            _receiveBufferSize = receiveBufferSize;
-            _needClientAuth = needClientAuth;
-            _wantClientAuth = wantClientAuth;
-        }
-
-        @Override
-        public boolean wantClientAuth()
-        {
-            return _wantClientAuth;
-        }
-
-        @Override
-        public boolean needClientAuth()
-        {
-            return _needClientAuth;
-        }
-
-        @Override
-        public Boolean getTcpNoDelay()
-        {
-            return _tcpNoDelay;
-        }
-
-        @Override
-        public Integer getSendBufferSize()
-        {
-            return _sendBufferSize;
-        }
-
-        @Override
-        public Integer getReceiveBufferSize()
-        {
-            return _receiveBufferSize;
-        }
-
-        @Override
-        public InetSocketAddress getAddress()
-        {
-            return _bindingSocketAddress;
-        }
-    };
-
     public String toString()
     {
         return getName();

Added: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/TransportProviderFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/TransportProviderFactory.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/TransportProviderFactory.java (added)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/plugin/TransportProviderFactory.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,35 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.plugin;
+
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.transport.TransportProvider;
+
+import java.util.Set;
+
+public interface TransportProviderFactory extends Pluggable
+{
+    Set<Set<Transport>> getSupportedTransports();
+
+    TransportProvider getTransportProvider(Set<Transport> transports);
+
+
+}

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java Thu Jan  9 16:53:51 2014
@@ -38,6 +38,7 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.Transport;
 import org.apache.qpid.server.plugin.ProtocolEngineCreator;
+import org.apache.qpid.transport.Binary;
 import org.apache.qpid.transport.Sender;
 import org.apache.qpid.transport.network.NetworkConnection;
 import org.apache.qpid.transport.network.security.SSLStatus;
@@ -274,9 +275,9 @@ public class MultiVersionProtocolEngine 
 
         public void received(ByteBuffer msg)
         {
-
             _lastReadTime = System.currentTimeMillis();
-            ByteBuffer msgheader = msg.duplicate();
+            ByteBuffer msgheader = msg.duplicate().slice();
+
             if(_header.remaining() > msgheader.limit())
             {
                 msg.position(msg.limit());
@@ -329,6 +330,7 @@ public class MultiVersionProtocolEngine 
                     }
                 }
 
+
                 if(newDelegate == null && looksLikeSSL(headerBytes))
                 {
                     if(_sslContext !=  null)

Added: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/AcceptingTransport.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/AcceptingTransport.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/AcceptingTransport.java (added)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/AcceptingTransport.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport;
+
+public interface AcceptingTransport
+{
+    public void start();
+    public void close();
+}

Added: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransport.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransport.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransport.java (added)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransport.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,140 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport;
+
+import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.protocol.AmqpProtocolVersion;
+import org.apache.qpid.server.protocol.MultiVersionProtocolEngineFactory;
+import org.apache.qpid.transport.NetworkTransportConfiguration;
+import org.apache.qpid.transport.network.IncomingNetworkTransport;
+
+import javax.net.ssl.SSLContext;
+import java.net.InetSocketAddress;
+import java.util.Set;
+
+import static org.apache.qpid.transport.ConnectionSettings.WILDCARD_ADDRESS;
+
+class TCPandSSLTransport implements AcceptingTransport
+{
+    private IncomingNetworkTransport _networkTransport;
+    private Set<Transport> _transports;
+    private SSLContext _sslContext;
+    private InetSocketAddress _bindingSocketAddress;
+    private Port _port;
+    private Set<AmqpProtocolVersion> _supported;
+    private AmqpProtocolVersion _defaultSupportedProtocolReply;
+
+    TCPandSSLTransport(final Set<Transport> transports,
+                       final SSLContext sslContext,
+                       final Port port,
+                       final Set<AmqpProtocolVersion> supported,
+                       final AmqpProtocolVersion defaultSupportedProtocolReply)
+    {
+        _transports = transports;
+        _sslContext = sslContext;
+        _port = port;
+        _supported = supported;
+        _defaultSupportedProtocolReply = defaultSupportedProtocolReply;
+    }
+
+    @Override
+    public void start()
+    {
+        String bindingAddress = (String) _port.getAttribute(Port.BINDING_ADDRESS);
+        if (WILDCARD_ADDRESS.equals(bindingAddress))
+        {
+            bindingAddress = null;
+        }
+        Integer port = (Integer) _port.getAttribute(Port.PORT);
+        if ( bindingAddress == null )
+        {
+            _bindingSocketAddress = new InetSocketAddress(port);
+        }
+        else
+        {
+            _bindingSocketAddress = new InetSocketAddress(bindingAddress, port);
+        }
+
+        final NetworkTransportConfiguration settings = new ServerNetworkTransportConfiguration();
+        _networkTransport = org.apache.qpid.transport.network.Transport.getIncomingTransportInstance();
+        final MultiVersionProtocolEngineFactory protocolEngineFactory =
+                new MultiVersionProtocolEngineFactory(
+                _port.getParent(Broker.class), _transports.contains(Transport.TCP) ? _sslContext : null,
+                settings.wantClientAuth(), settings.needClientAuth(),
+                _supported,
+                _defaultSupportedProtocolReply,
+                _port,
+                _transports.contains(Transport.TCP) ? Transport.TCP : Transport.SSL);
+
+        _networkTransport.accept(settings, protocolEngineFactory, _transports.contains(Transport.TCP) ? null : _sslContext);
+    }
+
+    @Override
+    public void close()
+    {
+        _networkTransport.close();
+    }
+
+    class ServerNetworkTransportConfiguration implements NetworkTransportConfiguration
+    {
+        public ServerNetworkTransportConfiguration()
+        {
+        }
+
+        @Override
+        public boolean wantClientAuth()
+        {
+            return (Boolean)_port.getAttribute(Port.WANT_CLIENT_AUTH);
+        }
+
+        @Override
+        public boolean needClientAuth()
+        {
+            return (Boolean)_port.getAttribute(Port.NEED_CLIENT_AUTH);
+        }
+
+        @Override
+        public Boolean getTcpNoDelay()
+        {
+            return (Boolean)_port.getAttribute(Port.TCP_NO_DELAY);
+        }
+
+        @Override
+        public Integer getSendBufferSize()
+        {
+            return (Integer)_port.getAttribute(Port.SEND_BUFFER_SIZE);
+        }
+
+        @Override
+        public Integer getReceiveBufferSize()
+        {
+            return (Integer)_port.getAttribute(Port.RECEIVE_BUFFER_SIZE);
+        }
+
+        @Override
+        public InetSocketAddress getAddress()
+        {
+            return _bindingSocketAddress;
+        }
+    }
+}

Added: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProvider.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProvider.java (added)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProvider.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,41 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport;
+
+import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.protocol.AmqpProtocolVersion;
+
+import javax.net.ssl.SSLContext;
+import java.util.Set;
+
+class TCPandSSLTransportProvider implements TransportProvider
+{
+    @Override
+    public AcceptingTransport createTransport(final Set<Transport> transports,
+                                              final SSLContext sslContext,
+                                              final Port port,
+                                              final Set<AmqpProtocolVersion> supported,
+                                              final AmqpProtocolVersion defaultSupportedProtocolReply)
+    {
+        return new TCPandSSLTransport(transports, sslContext, port, supported, defaultSupportedProtocolReply);
+    }
+}

Added: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java (added)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,55 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport;
+
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.TransportProviderFactory;
+
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.Set;
+
+public class TCPandSSLTransportProviderFactory implements TransportProviderFactory
+{
+
+    private static final String TYPE = "TCPandSSL";
+
+    @Override
+    public Set<Set<Transport>> getSupportedTransports()
+    {
+        return new HashSet<Set<Transport>>(Arrays.asList(EnumSet.of(Transport.TCP),
+                                                         EnumSet.of(Transport.SSL),
+                                                         EnumSet.of(Transport.TCP,Transport.SSL)));
+    }
+
+    @Override
+    public TransportProvider getTransportProvider(final Set<Transport> transports)
+    {
+        return new TCPandSSLTransportProvider();
+    }
+
+    @Override
+    public String getType()
+    {
+        return TYPE;
+    }
+}

Added: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TransportProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TransportProvider.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TransportProvider.java (added)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TransportProvider.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,38 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport;
+
+import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.protocol.AmqpProtocolVersion;
+
+import javax.net.ssl.SSLContext;
+import java.net.InetSocketAddress;
+import java.util.Set;
+
+public interface TransportProvider
+{
+    AcceptingTransport createTransport(Set<Transport> transports,
+                                       SSLContext sslContext,
+                                       Port port,
+                                       Set<AmqpProtocolVersion> supported,
+                                       AmqpProtocolVersion defaultSupportedProtocolReply);
+}

Copied: qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory (from r1556322, qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory?p2=qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory&p1=qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory&r1=1556322&r2=1556873&rev=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory Thu Jan  9 16:53:51 2014
@@ -16,4 +16,4 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-org.apache.qpid.server.model.adapter.FileSystemPreferencesProviderFactory
\ No newline at end of file
+org.apache.qpid.server.transport.TCPandSSLTransportProviderFactory
\ No newline at end of file

Copied: qpid/trunk/qpid/java/broker-plugins/websocket/build.xml (from r1556322, qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/websocket/build.xml?p2=qpid/trunk/qpid/java/broker-plugins/websocket/build.xml&p1=qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml&r1=1556322&r2=1556873&rev=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/memory-store/build.xml (original)
+++ qpid/trunk/qpid/java/broker-plugins/websocket/build.xml Thu Jan  9 16:53:51 2014
@@ -16,7 +16,7 @@
  - specific language governing permissions and limitations
  - under the License.
  -->
-<project name="Qpid Broker-Plugins Memory Store" default="build">
+<project name="Qpid Broker-Plugins Websocket Transport" default="build">
     <property name="module.depends" value="common broker-core" />
     <property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
 
@@ -24,7 +24,7 @@
     <property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker-core=provided"/>
 
     <property name="broker.plugin" value="true"/>
-    <property name="broker-plugins-memory-store.libs" value="" />
+    <property name="broker-plugins-websocket.libs" value="" />
 
     <import file="../../module.xml" />
 

Added: qpid/trunk/qpid/java/broker-plugins/websocket/pom.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/websocket/pom.xml?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/websocket/pom.xml (added)
+++ qpid/trunk/qpid/java/broker-plugins/websocket/pom.xml Thu Jan  9 16:53:51 2014
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>qpid-project</artifactId>
+        <groupId>org.apache.qpid</groupId>
+        <version>0.26-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>qpid-broker-plugins-websocket</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.qpid</groupId>
+            <artifactId>qpid-broker-core</artifactId>
+            <version>0.26-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <version>1.2</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty.orbit</groupId>
+                    <artifactId>javax.servlet</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-continuation</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-http</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-continuation</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-security</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-server</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-http</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-io</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-io</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-util</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-security</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-util</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-websocket</artifactId>
+            <version>7.6.10.v20130312</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-util</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-io</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-http</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        </dependencies>
+
+    <build>
+    </build>
+
+</project>
\ No newline at end of file

Added: qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java (added)
+++ qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,294 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport.websocket;
+
+import org.apache.qpid.protocol.ProtocolEngine;
+import org.apache.qpid.protocol.ProtocolEngineFactory;
+import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.protocol.AmqpProtocolVersion;
+import org.apache.qpid.server.protocol.MultiVersionProtocolEngineFactory;
+import org.apache.qpid.server.transport.AcceptingTransport;
+import org.apache.qpid.transport.Binary;
+import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.network.NetworkConnection;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.server.ssl.SslSocketConnector;
+import org.eclipse.jetty.util.ssl.SslContextFactory;
+import org.eclipse.jetty.websocket.WebSocket;
+import org.eclipse.jetty.websocket.WebSocketHandler;
+
+import javax.net.ssl.SSLContext;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.nio.ByteBuffer;
+import java.security.Principal;
+import java.util.Set;
+
+class WebSocketProvider implements AcceptingTransport
+{
+    public static final String AMQP_WEBSOCKET_SUBPROTOCOL = "AMQPWSB10";
+    private final Transport _transport;
+    private final SSLContext _sslContext;
+    private final Port _port;
+    private final Set<AmqpProtocolVersion> _supported;
+    private final AmqpProtocolVersion _defaultSupportedProtocolReply;
+    private final ProtocolEngineFactory _factory;
+    private Server _server;
+
+    WebSocketProvider(final Transport transport,
+                      final SSLContext sslContext,
+                      final Port port,
+                      final Set<AmqpProtocolVersion> supported,
+                      final AmqpProtocolVersion defaultSupportedProtocolReply)
+    {
+        _transport = transport;
+        _sslContext = sslContext;
+        _port = port;
+        _supported = supported;
+        _defaultSupportedProtocolReply = defaultSupportedProtocolReply;
+        _factory = new MultiVersionProtocolEngineFactory(
+                        _port.getParent(Broker.class), null,
+                        (Boolean)_port.getAttribute(Port.WANT_CLIENT_AUTH),
+                        (Boolean)_port.getAttribute(Port.NEED_CLIENT_AUTH),
+                        _supported,
+                        _defaultSupportedProtocolReply,
+                        _port,
+                        _transport);
+
+    }
+
+    @Override
+    public void start()
+    {
+        _server = new Server();
+
+        Connector connector = null;
+
+
+        if (_transport == Transport.WS)
+        {
+            connector = new SelectChannelConnector();
+        }
+        else if (_transport == Transport.WSS)
+        {
+            SslContextFactory factory = new SslContextFactory();
+            factory.setSslContext(_sslContext);
+            connector = new SslSocketConnector(factory);
+        }
+        else
+        {
+            throw new IllegalArgumentException("Unexpected transport on port " + _port.getName() + ":" + _transport);
+        }
+        String bindingAddress = _port.getBindingAddress();
+        if(bindingAddress != null && !bindingAddress.trim().equals("") && !bindingAddress.trim().equals("*"))
+        {
+            connector.setHost(bindingAddress.trim());
+        }
+        connector.setPort(_port.getPort());
+        _server.addConnector(connector);
+
+        WebSocketHandler wshandler = new WebSocketHandler()
+        {
+            @Override
+            public WebSocket doWebSocketConnect(final HttpServletRequest request, final String protocol)
+            {
+                SocketAddress remoteAddress = new InetSocketAddress(request.getRemoteHost(), request.getRemotePort());
+                SocketAddress localAddress = new InetSocketAddress(request.getLocalName(), request.getLocalPort());
+                return AMQP_WEBSOCKET_SUBPROTOCOL.equals(protocol) ? new AmqpWebSocket(_transport, localAddress, remoteAddress) : null;
+            }
+        };
+
+        _server.setHandler(wshandler);
+        try
+        {
+            _server.start();
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+
+    }
+
+    @Override
+    public void close()
+    {
+
+    }
+
+    private class AmqpWebSocket implements WebSocket,WebSocket.OnBinaryMessage
+    {
+        private final SocketAddress _localAddress;
+        private final SocketAddress _remoteAddress;
+        private Connection _connection;
+        private final Transport _transport;
+        private ProtocolEngine _engine;
+
+        private AmqpWebSocket(final Transport transport,
+                              final SocketAddress localAddress,
+                              final SocketAddress remoteAddress)
+        {
+            _transport = transport;
+            _localAddress = localAddress;
+            _remoteAddress = remoteAddress;
+        }
+
+        @Override
+        public void onMessage(final byte[] data, final int offset, final int length)
+        {
+            _engine.received(ByteBuffer.wrap(data, offset, length).slice());
+        }
+
+        @Override
+        public void onOpen(final Connection connection)
+        {
+            _connection = connection;
+
+            _engine = _factory.newProtocolEngine();
+
+            final NetworkConnection connectionWrapper = new ConnectionWrapper(connection, _localAddress, _remoteAddress);
+            _engine.setNetworkConnection(connectionWrapper, connectionWrapper.getSender());
+
+        }
+
+        @Override
+        public void onClose(final int closeCode, final String message)
+        {
+            _engine.closed();
+        }
+    }
+
+    private class ConnectionWrapper implements NetworkConnection, Sender<ByteBuffer>
+    {
+        private final WebSocket.Connection _connection;
+        private final SocketAddress _localAddress;
+        private final SocketAddress _remoteAddress;
+        private Principal _principal;
+        private int _maxWriteIdle;
+        private int _maxReadIdle;
+
+        public ConnectionWrapper(final WebSocket.Connection connection,
+                                 final SocketAddress localAddress,
+                                 final SocketAddress remoteAddress)
+        {
+            _connection = connection;
+            _localAddress = localAddress;
+            _remoteAddress = remoteAddress;
+        }
+
+        @Override
+        public Sender<ByteBuffer> getSender()
+        {
+            return this;
+        }
+
+        @Override
+        public void start()
+        {
+
+        }
+
+        @Override
+        public void setIdleTimeout(final int i)
+        {
+
+        }
+
+        @Override
+        public void send(final ByteBuffer msg)
+        {
+            try
+            {
+                _connection.sendMessage(msg.array(),msg.arrayOffset()+msg.position(),msg.remaining());
+            }
+            catch (IOException e)
+            {
+                close();
+            }
+        }
+
+        @Override
+        public void flush()
+        {
+
+        }
+
+        @Override
+        public void close()
+        {
+            _connection.close();
+        }
+
+        @Override
+        public SocketAddress getRemoteAddress()
+        {
+            return _remoteAddress;
+        }
+
+        @Override
+        public SocketAddress getLocalAddress()
+        {
+            return _localAddress;
+        }
+
+        @Override
+        public void setMaxWriteIdle(final int sec)
+        {
+            _maxWriteIdle = sec;
+        }
+
+        @Override
+        public void setMaxReadIdle(final int sec)
+        {
+            _maxReadIdle = sec;
+        }
+
+        @Override
+        public void setPeerPrincipal(final Principal principal)
+        {
+            _principal = principal;
+        }
+
+        @Override
+        public Principal getPeerPrincipal()
+        {
+            return _principal;
+        }
+
+        @Override
+        public int getMaxReadIdle()
+        {
+            return _maxReadIdle;
+        }
+
+        @Override
+        public int getMaxWriteIdle()
+        {
+            return _maxWriteIdle;
+        }
+    }
+}

Added: qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProvider.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProvider.java (added)
+++ qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProvider.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,51 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport.websocket;
+
+import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.protocol.AmqpProtocolVersion;
+import org.apache.qpid.server.transport.AcceptingTransport;
+import org.apache.qpid.server.transport.TransportProvider;
+
+import javax.net.ssl.SSLContext;
+import java.util.Set;
+
+class WebSocketTransportProvider implements TransportProvider
+{
+    public WebSocketTransportProvider()
+    {
+    }
+
+    @Override
+    public AcceptingTransport createTransport(final Set<Transport> transports,
+                                              final SSLContext sslContext,
+                                              final Port port,
+                                              final Set<AmqpProtocolVersion> supported,
+                                              final AmqpProtocolVersion defaultSupportedProtocolReply)
+    {
+        return new WebSocketProvider(transports.iterator().next(),
+                                     sslContext,
+                                     port,
+                                     supported,
+                                     defaultSupportedProtocolReply);
+    }
+}

Added: qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java (added)
+++ qpid/trunk/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java Thu Jan  9 16:53:51 2014
@@ -0,0 +1,53 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.transport.websocket;
+
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.TransportProviderFactory;
+import org.apache.qpid.server.transport.TransportProvider;
+
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Set;
+
+public class WebSocketTransportProviderFactory implements TransportProviderFactory
+{
+
+    private static final String TYPE = "Websocket";
+
+    @Override
+    public Set<Set<Transport>> getSupportedTransports()
+    {
+        return Collections.singleton((Set<Transport>)EnumSet.of(Transport.WS));
+    }
+
+    @Override
+    public TransportProvider getTransportProvider(final Set<Transport> transports)
+    {
+        return new WebSocketTransportProvider();
+    }
+
+    @Override
+    public String getType()
+    {
+        return TYPE;
+    }
+}

Added: qpid/trunk/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory?rev=1556873&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory (added)
+++ qpid/trunk/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory Thu Jan  9 16:53:51 2014
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.qpid.server.transport.websocket.WebSocketTransportProviderFactory
\ No newline at end of file

Modified: qpid/trunk/qpid/java/build.deps
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/build.deps?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/build.deps (original)
+++ qpid/trunk/qpid/java/build.deps Thu Jan  9 16:53:51 2014
@@ -74,6 +74,7 @@ amqp-1-0-common.libs=
 amqp-1-0-client.libs=
 amqp-1-0-client-example.libs=${commons-cli}
 amqp-1-0-client-jms.libs=${geronimo-jms}
+amqp-1-0-client-websocket.libs = ${jetty} ${jetty-continuation} ${jetty-security} ${jetty-http} ${jetty-io} ${jetty-servlet} ${jetty-util} ${servlet-api} ${jetty-websocket}
 tools.libs=${commons-configuration.libs} ${log4j}
 broker-core.libs=${commons-cli} ${commons-logging} ${log4j} ${slf4j-log4j} \
     ${xalan} ${derby-db} ${commons-configuration.libs} \

Modified: qpid/trunk/qpid/java/build.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/build.xml?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/build.xml (original)
+++ qpid/trunk/qpid/java/build.xml Thu Jan  9 16:53:51 2014
@@ -34,7 +34,7 @@
   <findSubProjects name="broker-plugins" dir="broker-plugins" excludes="${broker-plugins-exclude}"/>
   <findSubProjects name="client-plugins" dir="client-plugins"/>
 
-  <property name="modules.core"       value="qpid-test-utils common management/common amqp-1-0-common broker-core broker client amqp-1-0-client amqp-1-0-client-jms tools"/>
+  <property name="modules.core"       value="qpid-test-utils common management/common amqp-1-0-common broker-core broker client amqp-1-0-client amqp-1-0-client-jms amqp-1-0-client-websocket tools"/>
   <property name="modules.examples"   value="client/example management/example amqp-1-0-client/example amqp-1-0-client-jms/example"/>
   <property name="modules.tests"      value="systests perftests"/>
   <property name="modules.plugin"     value="${broker-plugins} ${client-plugins}"/>

Modified: qpid/trunk/qpid/java/ivy.nexus.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/ivy.nexus.xml?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/ivy.nexus.xml (original)
+++ qpid/trunk/qpid/java/ivy.nexus.xml Thu Jan  9 16:53:51 2014
@@ -135,6 +135,12 @@
     <artifact name="qpid-amqp-1-0-client-jms" type="jar.asc" ext="jar.asc"/>
     <artifact name="qpid-amqp-1-0-client-jms" type="source" ext="jar" e:classifier="sources"/>
     <artifact name="qpid-amqp-1-0-client-jms" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+    <artifact name="qpid-amqp-1-0-client-websocket" type="pom" ext="pom"/>
+    <artifact name="qpid-amqp-1-0-client-websocket" type="pom.asc" ext="pom.asc"/>
+    <artifact name="qpid-amqp-1-0-client-websocket" type="jar" ext="jar"/>
+    <artifact name="qpid-amqp-1-0-client-websocket" type="jar.asc" ext="jar.asc"/>
+    <artifact name="qpid-amqp-1-0-client-websocket" type="source" ext="jar" e:classifier="sources"/>
+    <artifact name="qpid-amqp-1-0-client-websocket" type="source.asc" ext="jar.asc" e:classifier="sources"/>
     <artifact name="qpid-management-common" type="pom" ext="pom"/>
     <artifact name="qpid-management-common" type="pom.asc" ext="pom.asc"/>
     <artifact name="qpid-management-common" type="jar" ext="jar"/>

Modified: qpid/trunk/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/module.xml?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/module.xml (original)
+++ qpid/trunk/qpid/java/module.xml Thu Jan  9 16:53:51 2014
@@ -584,8 +584,8 @@
     <copylist todir="${build.lib}" dir="${project.root}" files="${module.libs}"/>
   </target>
 
-
-  <target name="libs-release" description="copy dependencies into module release">
+  
+  <target name="libs-release-basic" description="copy dependencies into module release">
     <!-- Copy the module dependencies -->
       <echo message="${module.libs}"/>
     <copylist todir="${module.release}/lib" dir="${project.root}" files="${module.libs}"/>
@@ -594,10 +594,18 @@
     <!-- Copy the jar for this module -->
     <copy todir="${module.release}/lib" failonerror="true">
         <fileset file="${module.jar}"/>
+    </copy>
+  </target>
+
+  <target name="libs-release-module-depends" description="copy dependencies into module release" unless="release.exclude.module.deps">
+    <copy todir="${module.release}/lib" failonerror="true">
         <fileset dir="${build.lib}" includes="${module.depends.jars}"/>
     </copy>
   </target>
 
+  <target name="libs-release" description="copy dependencies into module release" depends="libs-release-basic,libs-release-module-depends">
+  </target>
+
   <target name="resources" description="copy resources into build tree">
     <copy todir="${build}" failonerror="false" flatten="true">
       <fileset dir="${basedir}${file.separator}.." includes="${resources}"/>

Modified: qpid/trunk/qpid/java/pom.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/pom.xml?rev=1556873&r1=1556872&r2=1556873&view=diff
==============================================================================
--- qpid/trunk/qpid/java/pom.xml (original)
+++ qpid/trunk/qpid/java/pom.xml Thu Jan  9 16:53:51 2014
@@ -137,6 +137,7 @@
   <modules>
     <module>amqp-1-0-client</module>
     <module>amqp-1-0-client-jms</module>
+    <module>amqp-1-0-client-websocket</module>
     <module>amqp-1-0-common</module>
     <module>broker</module>
     <module>broker-core</module>
@@ -153,6 +154,7 @@
     <module>broker-plugins/management-http</module>
     <module>broker-plugins/management-jmx</module>
     <module>broker-plugins/memory-store</module>
+    <module>broker-plugins/websocket</module>
     <module>common</module>
     <module>client</module>
     <module>management/common</module>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message