activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1076520 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
Date Thu, 03 Mar 2011 04:54:24 GMT
Author: chirino
Date: Thu Mar  3 04:54:23 2011
New Revision: 1076520

URL: http://svn.apache.org/viewvc?rev=1076520&view=rev
Log:
use more consistent variable naming scheme.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala?rev=1076520&r1=1076519&r2=1076520&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala
Thu Mar  3 04:54:23 2011
@@ -73,12 +73,13 @@ class Connector(val broker:Broker, val i
   override val dispatch_queue = broker.dispatch_queue
 
   var config:ConnectorDTO = defaultConfig
-  var transportServer:TransportServer = _
+  var transport_server:TransportServer = _
   var protocol:Protocol = _
 
   val connections = HashMap[Long, BrokerConnection]()
+  val accept_counter = new LongCounter()
+
   override def toString = "connector: "+config.id
-  val accept_counter = new LongCounter
 
   object BrokerAcceptListener extends TransportAcceptListener {
     def onAcceptError(e: Exception): Unit = {
@@ -111,7 +112,7 @@ class Connector(val broker:Broker, val i
 
       // We may need to stop acepting connections..
       if(at_connection_limit) {
-        transportServer.suspend
+        transport_server.suspend
       }
     }
   }
@@ -139,19 +140,19 @@ class Connector(val broker:Broker, val i
   override def _start(on_completed:Runnable) = {
     assert(config!=null, "Connector must be configured before it is started.")
     protocol = ProtocolFactory.get(config.protocol.getOrElse("multi")).get
-    transportServer = TransportFactory.bind( config.bind )
-    transportServer.setDispatchQueue(dispatch_queue)
-    transportServer.setAcceptListener(BrokerAcceptListener)
+    transport_server = TransportFactory.bind( config.bind )
+    transport_server.setDispatchQueue(dispatch_queue)
+    transport_server.setAcceptListener(BrokerAcceptListener)
 
-    if( transportServer.isInstanceOf[KeyAndTrustAware] ) {
+    if( transport_server.isInstanceOf[KeyAndTrustAware] ) {
       if( broker.key_storage!=null ) {
-        transportServer.asInstanceOf[KeyAndTrustAware].setTrustManagers(broker.key_storage.create_trust_managers)
-        transportServer.asInstanceOf[KeyAndTrustAware].setKeyManagers(broker.key_storage.create_key_managers)
+        transport_server.asInstanceOf[KeyAndTrustAware].setTrustManagers(broker.key_storage.create_trust_managers)
+        transport_server.asInstanceOf[KeyAndTrustAware].setKeyManagers(broker.key_storage.create_key_managers)
       } else {
         warn("You are using a transport the expects the broker's key storage to be configured.")
       }
     }
-    transportServer.start(^{
+    transport_server.start(^{
       info("Accepting connections at: "+config.bind)
       on_completed.run
     })
@@ -159,7 +160,7 @@ class Connector(val broker:Broker, val i
 
 
   override def _stop(on_completed:Runnable): Unit = {
-    transportServer.stop(^{
+    transport_server.stop(^{
       info("Stopped connector at: "+config.bind)
       val tracker = new LoggingTracker(toString, dispatch_queue)
       connections.valuesIterator.foreach { connection=>
@@ -178,7 +179,7 @@ class Connector(val broker:Broker, val i
     if( connections.remove(connection.id).isDefined ) {
       info("Client disconnected from: %s", connection.transport.getRemoteAddress)
       if( at_limit ) {
-        transportServer.resume
+        transport_server.resume
       }
     }
   }

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala?rev=1076520&r1=1076519&r2=1076520&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
Thu Mar  3 04:54:23 2011
@@ -34,7 +34,7 @@ class StompTestSupport extends FunSuiteS
       info("Loading broker configuration from the classpath with URI: " + broker_config_uri)
       broker = BrokerFactory.createBroker(broker_config_uri)
       ServiceControl.start(broker, "Starting broker")
-      port = broker.connectors.head.transportServer.getSocketAddress.getPort
+      port = broker.connectors.head.transport_server.getSocketAddress.getPort
     }
     catch {
       case e:Throwable => e.printStackTrace



Mime
View raw message