You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2012/02/05 22:54:03 UTC
svn commit: r1240839 - in
/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker:
Connection.scala jetty/WebSocketTransportFactory.scala
Author: chirino
Date: Sun Feb 5 21:54:02 2012
New Revision: 1240839
URL: http://svn.apache.org/viewvc?rev=1240839&view=rev
Log:
Support changing the dispatch queue assigned to a connection.
Modified:
activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala
activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala?rev=1240839&r1=1240838&r2=1240839&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connection.scala Sun Feb 5 21:54:02 2012
@@ -35,7 +35,19 @@ object Connection extends Log
abstract class Connection() extends BaseService with Dispatched {
import Connection._
- val dispatch_queue = createQueue()
+ private var _dispatch_queue = createQueue()
+ def dispatch_queue = _dispatch_queue
+
+ def set_dispatch_queue(next_queue:DispatchQueue)(on_complete: =>Unit) {
+ _dispatch_queue {
+ if(transport!=null) {
+ transport.setDispatchQueue(next_queue)
+ }
+ _dispatch_queue = next_queue
+ on_complete
+ }
+ }
+
var stopped = true
var transport:Transport = null
var transport_sink:TransportSink = null
Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala?rev=1240839&r1=1240838&r2=1240839&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jetty/WebSocketTransportFactory.scala Sun Feb 5 21:54:02 2012
@@ -189,9 +189,14 @@ object WebSocketTransportFactory extends
// Transport interface methods.
/////////////////////////////////////////////////////////////////////////
- @BeanProperty
var dispatchQueue = createQueue()
+ def getDispatchQueue: DispatchQueue = dispatchQueue
+ def setDispatchQueue(queue: DispatchQueue) {
+ dispatchQueue = queue
+ drain_outbound_events.setTargetQueue(queue);
+ }
+
@BeanProperty
var transportListener: TransportListener = _