qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r816261 [1/8] - in /qpid/branches/java-network-refactor: ./ qpid/cpp/bindings/qmf/python/ qpid/cpp/bindings/qmf/ruby/ qpid/cpp/bindings/qmf/tests/ qpid/cpp/include/qpid/messaging/ qpid/cpp/src/ qpid/cpp/src/qmf/ qpid/cpp/src/qpid/acl/ qpid/...
Date Thu, 17 Sep 2009 16:21:21 GMT
Author: aidan
Date: Thu Sep 17 16:21:13 2009
New Revision: 816261

URL: http://svn.apache.org/viewvc?rev=816261&view=rev
Log:
Merge from trunk

Added:
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp
      - copied unchanged from r816233, qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h
      - copied unchanged from r816233, qpid/trunk/qpid/cpp/src/qpid/client/amqp0_10/AcceptTracker.h
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-acl-settings.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-acl-settings.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-acl.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-acl.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-derby-settings.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-derby-settings.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-derby.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-derby.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests-settings.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests-settings.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/config-systests.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/config-systests.xml
    qpid/branches/java-network-refactor/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/ModelTest.java
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/ModelTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/JMXTestUtils.java
      - copied unchanged from r816233, qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/JMXTestUtils.java
Removed:
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/CompletionTracker.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/CompletionTracker.h
    qpid/branches/java-network-refactor/qpid/java/broker/etc/acl.config.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/config-systests-derby.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/config-systests.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/persistent_config-config-test.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/sample-parsed-config.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/virtualhosts-config-test.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/virtualhosts-systests.xml
    qpid/branches/java-network-refactor/qpid/java/broker/etc/virtualhosts.xml
Modified:
    qpid/branches/java-network-refactor/   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/Makefile.am
    qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/qmf.py
    qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/ruby/qmf.rb
    qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/agent_ruby.rb
    qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/python_agent.py
    qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/ruby_console.rb
    qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Receiver.h
    qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Sender.h
    qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Session.h
    qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt
    qpid/branches/java-network-refactor/qpid/cpp/src/Makefile.am
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.cpp   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.h   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ConsoleEngine.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ConsoleEngine.h   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/Object.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ObjectId.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ObjectIdImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ObjectIdImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ObjectImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ObjectImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/Query.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/QueryImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/QueryImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/SchemaImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/SchemaImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/SequenceManager.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qmf/SequenceManager.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/acl/AclData.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/acl/AclData.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/acl/AclReader.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/AclModule.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/Exchange.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/Message.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/Message.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/MessageBuilder.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/PersistableMessage.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/PersistableMessage.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/QueueRegistry.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/Dispatcher.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/IncomingMessages.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/ReceiverImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/ReceiverImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/SenderImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/SenderImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/cluster/Connection.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/cluster/Quorum_cman.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/cluster/UpdateClient.cpp   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/cluster/UpdateClient.h   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/management/ManagementAgent.cpp   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/management/ManagementAgent.h   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/Address.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/Receiver.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/ReceiverImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/Sender.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/SenderImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/Session.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/messaging/SessionImpl.h
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/sys/rdma/RdmaClient.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/sys/rdma/RdmaServer.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/qpid/xml/XmlExchange.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/AccumulatedAckTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/Array.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/AsyncCompletion.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/AtomicValue.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/BrokerFixture.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ClientMessageTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ClientSessionTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ClusterFailover.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ClusterFixture.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ClusterFixture.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ConnectionOptions.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ConsoleTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/DeliveryRecordTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/DispatcherTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/DtxWorkRecordTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ExchangeTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/FieldTable.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/FieldValue.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ForkedBroker.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ForkedBroker.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/Frame.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/FrameDecoder.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/FramingTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/HeaderTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/HeadersExchangeTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/IncompleteMessageList.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/InlineAllocator.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/InlineVector.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ManagementTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/MessageBuilderTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/MessageReplayTracker.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/MessageTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/MessageUtils.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/MessagingSessionTests.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/PartialFailure.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/PollableCondition.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ProxyTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/QueueEvents.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/QueueOptionsTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/QueuePolicyTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/QueueRegistryTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/QueueTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/RangeSet.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/RateFlowcontrolTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/RefCounted.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/ReplicationTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/RetryList.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/SequenceNumberTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/SequenceSet.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/SessionState.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/Shlib.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/SocketProxy.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TestMessageStore.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TestOptions.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TimerTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TopicExchangeTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TxBufferTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TxMocks.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/TxPublishTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/Url.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/Uuid.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/Variant.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/XmlClientSessionTest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/acl.py
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/client_test.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster_test.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster_tests.py   (props changed)
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/consume.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/datagen.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/echotest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/exception_test.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/failover_soak.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/latencytest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/logging.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/perftest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/publish.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/qpid_ping.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/qrsh.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/qrsh_server.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/receiver.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/replaying_sender.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/resuming_receiver.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/sender.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/shlibtest.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/test_store.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/test_tools.h
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/topic_listener.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/topic_publisher.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/txjob.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/txshift.cpp
    qpid/branches/java-network-refactor/qpid/cpp/src/tests/txtest.cpp
    qpid/branches/java-network-refactor/qpid/dotnet/build-msbuild.bat   (props changed)
    qpid/branches/java-network-refactor/qpid/dotnet/build-nant-release   (props changed)
    qpid/branches/java-network-refactor/qpid/dotnet/build-nant.bat   (props changed)
    qpid/branches/java-network-refactor/qpid/java/broker/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/broker/bin/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/broker/bin/qpid-passwd
    qpid/branches/java-network-refactor/qpid/java/broker/etc/config.xml
    qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
    qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
    qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/management/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
    qpid/branches/java-network-refactor/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
    qpid/branches/java-network-refactor/qpid/java/lib/org.osgi.core_1.0.0.jar   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/client/src/main/java/org/apache/qpid/management/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/client/src/test/java/org/apache/qpid/management/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc   (props changed)
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java   (props changed)
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DerbyMessageStoreLoggingTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
    qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
    qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/08StandaloneExcludes   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/08TransientExcludes   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/XAExcludes   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/clean-dir   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.async.testprofile   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.cluster.testprofile   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.noprefetch.testprofile   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.ssl.excludes   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.ssl.testprofile   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.testprofile   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/default.testprofile   (contents, props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/java-derby.testprofile   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/java.testprofile   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/log4j-test.xml   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/test-provider.properties   (props changed)
    qpid/branches/java-network-refactor/qpid/java/test-profiles/test_resources/   (props changed)
    qpid/branches/java-network-refactor/qpid/python/qpid/concurrency.py   (props changed)
    qpid/branches/java-network-refactor/qpid/python/qpid/datatypes.py
    qpid/branches/java-network-refactor/qpid/python/qpid/delegates.py
    qpid/branches/java-network-refactor/qpid/python/qpid/ops.py
    qpid/branches/java-network-refactor/qpid/python/tests/datatypes.py
    qpid/branches/java-network-refactor/qpid/python/tests_0-9/queue.py   (props changed)
    qpid/branches/java-network-refactor/qpid/ruby/ext/sasl/extconf.rb   (props changed)
    qpid/branches/java-network-refactor/qpid/specs/management-schema.xml

Propchange: qpid/branches/java-network-refactor/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1 +1 @@
-/qpid/trunk:805429-812920
+/qpid/trunk:805429-816233

Modified: qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/Makefile.am?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/Makefile.am (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/Makefile.am Thu Sep 17 16:21:13 2009
@@ -29,7 +29,7 @@
 BUILT_SOURCES = $(generated_file_list)
 
 $(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmfengine.i
-	swig -python -c++ -Wall -I/usr/include $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -o qmfengine.cpp $(srcdir)/python.i
+	swig -c++ -python -Wall -I/usr/include $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -o qmfengine.cpp $(srcdir)/python.i
 
 pylibdir = $(PYTHON_LIB)
 

Modified: qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/qmf.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/qmf.py?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/qmf.py (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/python/qmf.py Thu Sep 17 16:21:13 2009
@@ -30,6 +30,8 @@
                        TYPE_INT8, TYPE_LIST, TYPE_LSTR, TYPE_MAP, TYPE_OBJECT, 
                        TYPE_REF, TYPE_SSTR, TYPE_UINT16, TYPE_UINT32, TYPE_UINT64, 
                        TYPE_UINT8, TYPE_UUID)
+from qmfengine import (O_EQ, O_NE, O_LT, O_LE, O_GT, O_GE, O_RE_MATCH, O_RE_NOMATCH,
+                       E_NOT, E_AND, E_OR, E_XOR)
 
 
   ##==============================================================================
@@ -404,11 +406,16 @@
 
 
 class Query:
-    def __init__(self, i=None):
+    def __init__(self, i=None, package="", cls=None, oid=None):
         if i:
             self.impl = i
         else:
-            self.impl = qmfengine.Query()
+            if cls:
+                self.impl = qmfengine.Query(cls, package)
+            elif oid:
+                self.impl = qmfengine.Query(oid)
+            else:
+                raise "Argument error"
         
 
     def package_name(self): return self.impl.getPackage()
@@ -419,9 +426,6 @@
             return ObjectId(_objid)
         else:
             return None
-    OPER_AND = qmfengine.Query.OPER_AND
-    OPER_OR = qmfengine.Query.OPER_OR
-
 
 
   ##==============================================================================

Modified: qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/ruby/qmf.rb
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/ruby/qmf.rb?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/ruby/qmf.rb (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/ruby/qmf.rb Thu Sep 17 16:21:13 2009
@@ -67,6 +67,7 @@
   class ConnectionHandler
     def conn_event_connected(); end
     def conn_event_disconnected(error); end
+    def conn_event_visit(); end
     def sess_event_session_closed(context, error); end
     def sess_event_recv(context, message); end
   end
@@ -82,6 +83,7 @@
       @sockEngine, @sock = Socket::socketpair(Socket::PF_UNIX, Socket::SOCK_STREAM, 0)
       @impl.setNotifyFd(@sockEngine.fileno)
       @new_conn_handlers = []
+      @conn_handlers_to_delete = []
       @conn_handlers = []
 
       @thread = Thread.new do
@@ -89,17 +91,30 @@
       end
     end
 
+    def kick
+      @sockEngine.write(".")
+      @sockEngine.flush
+    end
+
     def add_conn_handler(handler)
       synchronize do
         @new_conn_handlers << handler
       end
-      @sockEngine.write("x")
+      kick
+    end
+
+    def del_conn_handler(handler)
+      synchronize do
+        @conn_handlers_to_delete << handler
+      end
+      kick
     end
 
     def run()
       eventImpl = Qmfengine::ResilientConnectionEvent.new
       connected = nil
       new_handlers = nil
+      del_handlers = nil
       bt_count = 0
 
       while :true
@@ -107,7 +122,9 @@
 
         synchronize do
           new_handlers = @new_conn_handlers
+          del_handlers = @conn_handlers_to_delete
           @new_conn_handlers = []
+          @conn_handlers_to_delete = []
         end
 
         new_handlers.each do |nh|
@@ -116,6 +133,11 @@
         end
         new_handlers = nil
 
+        del_handlers.each do |dh|
+          d = @conn_handlers.delete(dh)
+        end
+        del_handlers = nil
+
         valid = @impl.getEvent(eventImpl)
         while valid
           begin
@@ -141,6 +163,7 @@
           @impl.popEvent
           valid = @impl.getEvent(eventImpl)
         end
+        @conn_handlers.each { |h| h.conn_event_visit }
       end
     end
   end
@@ -167,23 +190,20 @@
 
   class QmfObject
     attr_reader :impl, :object_class
-    def initialize(cls)
-      @object_class = cls
-      @impl = Qmfengine::Object.new(@object_class.impl)
-    end
-
-    def destroy
-      @impl.destroy
+    def initialize(cls, kwargs={})
+      if cls:
+        @object_class = cls
+        @impl = Qmfengine::Object.new(@object_class.impl)
+      elsif kwargs.include?(:impl)
+        @impl = Qmfengine::Object.new(kwargs[:impl])
+        @object_class = SchemaObjectClass.new(nil, nil, :impl => @impl.getClass)
+      end
     end
 
     def object_id
       return ObjectId.new(@impl.getObjectId)
     end
 
-    def set_object_id(oid)
-      @impl.setObjectId(oid.impl)
-    end
-
     def get_attr(name)
       val = value(name)
       case val.getType
@@ -248,17 +268,31 @@
     def value(name)
       val = @impl.getValue(name.to_s)
       if val.nil?
-        raise ArgumentError, "Attribute '#{name}' not defined for class #{@object_class.impl.getName}"
+        raise ArgumentError, "Attribute '#{name}' not defined for class #{@object_class.impl.getClassKey.getPackageName}:#{@object_class.impl.getClassKey.getClassName}"
       end
       return val
     end
   end
 
+  class AgentObject < QmfObject
+    def initialize(cls, kwargs={})
+      super(cls, kwargs)
+    end
+
+    def destroy
+      @impl.destroy
+    end
+
+    def set_object_id(oid)
+      @impl.setObjectId(oid.impl)
+    end
+  end
+
   class ConsoleObject < QmfObject
     attr_reader :current_time, :create_time, :delete_time
 
-    def initialize(cls)
-      super(cls)
+    def initialize(cls, kwargs={})
+      super(cls, kwargs)
     end
 
     def update()
@@ -373,10 +407,30 @@
     end
   end
 
+  ##==============================================================================
+  ## QUERY
+  ##==============================================================================
+
   class Query
     attr_reader :impl
-    def initialize(i)
-      @impl = i
+    def initialize(kwargs = {})
+      if kwargs.include?(:impl)
+        @impl = kwargs[:impl]
+      else
+        package = ''
+        if kwargs.include?(:key)
+          @impl = Qmfengine::Query.new(kwargs[:key])
+        elsif kwargs.include?(:object_id)
+          @impl = Qmfengine::Query.new(kwargs[:object_id])
+        else
+          package = kwargs[:package] if kwargs.include?(:package)
+          if kwargs.include?(:class)
+            @impl = Qmfengine::Query.new(kwargs[:class], package)
+          else
+            raise ArgumentError, "Invalid arguments, use :key or :class[,:package]"
+          end
+        end
+      end
     end
 
     def package_name
@@ -403,36 +457,60 @@
   class SchemaArgument
     attr_reader :impl
     def initialize(name, typecode, kwargs={})
-      @impl = Qmfengine::SchemaArgument.new(name, typecode)
-      @impl.setDirection(kwargs[:dir]) if kwargs.include?(:dir)
-      @impl.setUnit(kwargs[:unit])     if kwargs.include?(:unit)
-      @impl.setDesc(kwargs[:desc])     if kwargs.include?(:desc)
+      if kwargs.include?(:impl)
+        @impl = kwargs[:impl]
+      else
+        @impl = Qmfengine::SchemaArgument.new(name, typecode)
+        @impl.setDirection(kwargs[:dir]) if kwargs.include?(:dir)
+        @impl.setUnit(kwargs[:unit])     if kwargs.include?(:unit)
+        @impl.setDesc(kwargs[:desc])     if kwargs.include?(:desc)
+      end
+    end
+
+    def name
+      @impl.getName
     end
   end
 
   class SchemaMethod
-    attr_reader :impl
+    attr_reader :impl, :arguments
     def initialize(name, kwargs={})
-      @impl = Qmfengine::SchemaMethod.new(name)
-      @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc)
       @arguments = []
+      if kwargs.include?(:impl)
+        @impl = kwargs[:impl]
+        arg_count = @impl.getArgumentCount
+        for i in 0...arg_count
+          @arguments << SchemaArgument.new(nil, nil, :impl => @impl.getArgument(i))
+        end
+      else
+        @impl = Qmfengine::SchemaMethod.new(name)
+        @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc)
+      end
     end
 
     def add_argument(arg)
       @arguments << arg
       @impl.addArgument(arg.impl)
     end
+
+    def name
+      @impl.getName
+    end
   end
 
   class SchemaProperty
     attr_reader :impl
     def initialize(name, typecode, kwargs={})
-      @impl = Qmfengine::SchemaProperty.new(name, typecode)
-      @impl.setAccess(kwargs[:access])     if kwargs.include?(:access)
-      @impl.setIndex(kwargs[:index])       if kwargs.include?(:index)
-      @impl.setOptional(kwargs[:optional]) if kwargs.include?(:optional)
-      @impl.setUnit(kwargs[:unit])         if kwargs.include?(:unit)
-      @impl.setDesc(kwargs[:desc])         if kwargs.include?(:desc)
+      if kwargs.include?(:impl)
+        @impl = kwargs[:impl]
+      else
+        @impl = Qmfengine::SchemaProperty.new(name, typecode)
+        @impl.setAccess(kwargs[:access])     if kwargs.include?(:access)
+        @impl.setIndex(kwargs[:index])       if kwargs.include?(:index)
+        @impl.setOptional(kwargs[:optional]) if kwargs.include?(:optional)
+        @impl.setUnit(kwargs[:unit])         if kwargs.include?(:unit)
+        @impl.setDesc(kwargs[:desc])         if kwargs.include?(:desc)
+      end
     end
 
     def name
@@ -443,9 +521,17 @@
   class SchemaStatistic
     attr_reader :impl
     def initialize(name, typecode, kwargs={})
-      @impl = Qmfengine::SchemaStatistic.new(name, typecode)
-      @impl.setUnit(kwargs[:unit]) if kwargs.include?(:unit)
-      @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc)
+      if kwargs.include?(:impl)
+        @impl = kwargs[:impl]
+      else
+        @impl = Qmfengine::SchemaStatistic.new(name, typecode)
+        @impl.setUnit(kwargs[:unit]) if kwargs.include?(:unit)
+        @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc)
+      end
+    end
+
+    def name
+      @impl.getName
     end
   end
 
@@ -465,13 +551,25 @@
   end
 
   class SchemaObjectClass
-    attr_reader :impl
-    def initialize(package='', name='', kwargs={})
+    attr_reader :impl, :properties, :statistics, :methods
+    def initialize(package, name, kwargs={})
       @properties = []
       @statistics = []
       @methods = []
       if kwargs.include?(:impl)
         @impl = kwargs[:impl]
+
+        @impl.getPropertyCount.times do |i|
+          @properties << SchemaProperty.new(nil, nil, :impl => @impl.getProperty(i))
+        end
+
+        @impl.getStatisticCount.times do |i|
+          @statistics << SchemaStatistic.new(nil, nil, :impl => @impl.getStatistic(i))
+        end
+          
+        @impl.getMethodCount.times do |i|
+          @methods << SchemaMethod.new(nil, :impl => @impl.getMethod(i))
+        end
       else
         @impl = Qmfengine::SchemaObjectClass.new(package, name)
       end
@@ -495,24 +593,17 @@
     def name
       @impl.getClassKey.getClassName
     end
-
-    def properties
-      unless @properties
-        @properties = []
-        @impl.getPropertyCount.times do |i|
-          @properties << @impl.getProperty(i)
-        end
-      end
-      return @properties
-    end
   end
 
   class SchemaEventClass
-    attr_reader :impl
-    def initialize(package='', name='', kwargs={})
+    attr_reader :impl, :arguments
+    def initialize(package, name, kwargs={})
       @arguments = []
       if kwargs.include?(:impl)
         @impl = kwargs[:impl]
+        @impl.getArgumentCount.times do |i|
+          @arguments << SchemaArgument.new(nil, nil, :impl => @impl.getArgument(i))
+        end
       else
         @impl = Qmfengine::SchemaEventClass.new(package, name)
         @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc)
@@ -546,13 +637,18 @@
   end
 
   class Console
+    include MonitorMixin
     attr_reader :impl
 
     def initialize(handler = nil, kwargs={})
+      super()
       @handler = handler
       @impl = Qmfengine::ConsoleEngine.new
       @event = Qmfengine::ConsoleEvent.new
       @broker_list = []
+      @cv = new_cond
+      @sync_count = nil
+      @sync_result = nil
     end
 
     def add_connection(conn)
@@ -562,6 +658,8 @@
     end
 
     def del_connection(broker)
+      broker.shutdown
+      @broker_list.delete(broker)
     end
 
     def get_packages()
@@ -581,9 +679,9 @@
         class_kind = @impl.getClassKind(key)
         if class_kind == kind
           if kind == CLASS_OBJECT
-            clist << SchemaObjectClass.new('', '', :impl => @impl.getObjectClass(key))
+            clist << SchemaObjectClass.new(nil, nil, :impl => @impl.getObjectClass(key))
           elsif kind == CLASS_EVENT
-            clist << SchemaEventClass.new('', '', :impl => @impl.getEventClass(key))
+            clist << SchemaEventClass.new(nil, nil, :impl => @impl.getEventClass(key))
           end
         end
       end
@@ -591,19 +689,70 @@
       return clist
     end
 
-    def get_schema(class_key)
-    end
-
     def bind_package(package)
+      @impl.bindPackage(package)
     end
 
     def bind_class(kwargs = {})
+      if kwargs.include?(:key)
+        @impl.bindClass(kwargs[:key])
+      elsif kwargs.include?(:package)
+        package = kwargs[:package]
+        if kwargs.include?(:class)
+          @impl.bindClass(package, kwargs[:class])
+        else
+          @impl.bindClass(package)
+        end
+      else
+        raise ArgumentError, "Invalid arguments, use :key or :package[,:class]"
+      end
     end
 
     def get_agents(broker = nil)
+      blist = []
+      if broker
+        blist << broker
+      else
+        blist = @broker_list
+      end
+
+      agents = []
+      blist.each do |b|
+        count = b.impl.agentCount
+        for idx in 0...count
+          agents << AgentProxy.new(b.impl.getAgent(idx), b)
+        end
+      end
+
+      return agents
     end
 
     def get_objects(query, kwargs = {})
+      timeout = 30
+      if kwargs.include?(:timeout)
+        timeout = kwargs[:timeout]
+      end
+      synchronize do
+        @sync_count = 1
+        @sync_result = []
+        broker = @broker_list[0]
+        broker.send_query(query.impl, nil)
+        unless @cv.wait(timeout) { @sync_count == 0 }
+          raise "Timed out waiting for response"
+        end
+
+        return @sync_result
+      end
+    end
+
+    def _get_result(list, context)
+      synchronize do
+        list.each do |item|
+          @sync_result << item
+        end
+        @sync_count -= 1
+        @cv.signal
+      end
     end
 
     def start_sync(query)
@@ -638,6 +787,19 @@
     end
   end
 
+  class AgentProxy
+    attr_reader :broker
+
+    def initialize(impl, broker)
+      @impl = impl
+      @broker = broker
+    end
+
+    def label
+      @impl.getLabel
+    end
+  end
+
   class Broker < ConnectionHandler
     include MonitorMixin
     attr_reader :impl
@@ -654,6 +816,13 @@
       @impl = Qmfengine::BrokerProxy.new(@console.impl)
       @console.impl.addConnection(@impl, self)
       @conn.add_conn_handler(self)
+      @operational = :true
+    end
+
+    def shutdown()
+      @console.impl.delConnection(@impl)
+      @conn.del_conn_handler(self)
+      @operational = :false
     end
 
     def waitForStable(timeout = nil)
@@ -671,6 +840,11 @@
       end
     end
 
+    def send_query(query, ctx)
+      @impl.sendQuery(query, ctx)
+      @conn.kick
+    end
+
     def do_broker_events()
       count = 0
       valid = @impl.getEvent(@event)
@@ -694,6 +868,12 @@
             @stable = :true
             @cv.signal
           end
+        when Qmfengine::BrokerEvent::QUERY_COMPLETE
+          result = []
+          for idx in 0...@event.queryResponse.getObjectCount
+            result << ConsoleObject.new(nil, :impl => @event.queryResponse.getObject(idx))
+          end
+          @console._get_result(result, @event.context)
         end
         @impl.popEvent
         valid = @impl.getEvent(@event)
@@ -732,12 +912,17 @@
       puts "Console Connection Lost"
     end
 
+    def conn_event_visit
+      do_events
+    end
+
     def sess_event_session_closed(context, error)
       puts "Console Session Lost"
       @impl.sessionClosed()
     end
 
     def sess_event_recv(context, message)
+      puts "Unexpected RECV Event" if not @operational
       @impl.handleRcvMessage(message)
       do_events
     end
@@ -798,7 +983,7 @@
         count += 1
         case @event.kind
         when Qmfengine::AgentEvent::GET_QUERY
-          @handler.get_query(@event.sequence, Query.new(@event.query), @event.authUserId)
+          @handler.get_query(@event.sequence, Query.new(:impl => @event.query), @event.authUserId)
         when Qmfengine::AgentEvent::START_SYNC
         when Qmfengine::AgentEvent::END_SYNC
         when Qmfengine::AgentEvent::METHOD_CALL
@@ -852,6 +1037,10 @@
       puts "Agent Connection Lost"
     end
 
+    def conn_event_visit
+      do_events
+    end
+
     def sess_event_session_closed(context, error)
       puts "Agent Session Lost"
     end

Modified: qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/agent_ruby.rb
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/agent_ruby.rb?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/agent_ruby.rb (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/agent_ruby.rb Thu Sep 17 16:21:13 2009
@@ -72,8 +72,7 @@
 
 class App < Qmf::AgentHandler
   def get_query(context, query, userId)
-#    puts "Query: user=#{userId} context=#{context} class=#{query.class_name} object_num=#{query.object_id.object_num_low if query.object_id}"
-    #@parent.inc_attr("queryCount")
+#   puts "Query: user=#{userId} context=#{context} class=#{query.class_name} object_num=#{query.object_id.object_num_low if query.object_id}"
     if query.class_name == 'parent'
         @agent.query_response(context, @parent)
     elsif query.object_id == @parent_oid
@@ -135,7 +134,7 @@
     elsif name == "create_child"
       oid = @agent.alloc_object_id(2)
       args['child_ref'] = oid
-      @child = Qmf::QmfObject.new(@model.child_class)
+      @child = Qmf::AgentObject.new(@model.child_class)
       @child.set_attr("name", args.by_key("child_name"))
       @child.set_object_id(oid)
       @agent.method_response(context, 0, "OK", args)
@@ -161,7 +160,7 @@
 
     @agent.set_connection(@connection)
 
-    @parent = Qmf::QmfObject.new(@model.parent_class)
+    @parent = Qmf::AgentObject.new(@model.parent_class)
     @parent.set_attr("name", "Parent One")
     @parent.set_attr("state", "OPERATIONAL")
 

Modified: qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/python_agent.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/python_agent.py?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/python_agent.py (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/python_agent.py Thu Sep 17 16:21:13 2009
@@ -72,7 +72,9 @@
 
 class App(qmf.AgentHandler):
     def get_query(self, context, query, userId):
-        #    puts "Query: user=#{userId} context=#{context} class=#{query.class_name} object_num=#{query.object_id.object_num_low if query.object_id}"
+        #print "Query: user=%s context=%d class=%s" % (userId, context, query.class_name())
+        #if query.object_id():
+        #    print query.object_id().object_num_low()
         self._parent.inc_attr("queryCount")
         if query.class_name() == 'parent':
             self._agent.query_response(context, self._parent)

Modified: qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/ruby_console.rb
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/ruby_console.rb?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/ruby_console.rb (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/bindings/qmf/tests/ruby_console.rb Thu Sep 17 16:21:13 2009
@@ -24,33 +24,90 @@
 
 class App < Qmf::ConsoleHandler
 
-  def main
-    @settings = Qmf::ConnectionSettings.new
-    @settings.set_attr("host", ARGV[0]) if ARGV.size > 0
-    @settings.set_attr("port", ARGV[1].to_i) if ARGV.size > 1
-    @connection = Qmf::Connection.new(@settings)
-    @qmf = Qmf::Console.new
-
-    @broker = @qmf.add_connection(@connection)
-    @broker.waitForStable
-
-    packages = @qmf.get_packages
+  def dump_schema
+    packages = @qmfc.get_packages
     puts "----- Packages -----"
     packages.each do |p|
       puts p
       puts "    ----- Object Classes -----"
-      classes = @qmf.get_classes(p)
+      classes = @qmfc.get_classes(p)
       classes.each do |c|
         puts "    #{c.name}"
+
+        puts "        ---- Properties ----"
+        props = c.properties
+        props.each do |prop|
+          puts "        #{prop.name}"
+        end
+
+        puts "        ---- Statistics ----"
+        stats = c.statistics
+        stats.each do |stat|
+          puts "        #{stat.name}"
+        end
+
+        puts "        ---- Methods ----"
+        methods = c.methods
+        methods.each do |method|
+          puts "        #{method.name}"
+          puts "            ---- Args ----"
+          args = method.arguments
+          args.each do |arg|
+            puts "            #{arg.name}"
+          end
+        end
       end
+
       puts "    ----- Event Classes -----"
-      classes = @qmf.get_classes(p, Qmf::CLASS_EVENT)
+      classes = @qmfc.get_classes(p, Qmf::CLASS_EVENT)
       classes.each do |c|
         puts "    #{c.name}"
+        puts "        ---- Args ----"
+        args = c.arguments
+        args.each do |arg|
+          puts "        #{arg.name}"
+        end
       end
     end
     puts "-----"
+  end
+
+  def main
+    @settings = Qmf::ConnectionSettings.new
+    @settings.set_attr("host", ARGV[0]) if ARGV.size > 0
+    @settings.set_attr("port", ARGV[1].to_i) if ARGV.size > 1
+    @connection = Qmf::Connection.new(@settings)
+    @qmfc = Qmf::Console.new
+
+    @broker = @qmfc.add_connection(@connection)
+    @broker.waitForStable
+
+    dump_schema
+
+    agents = @qmfc.get_agents()
+    puts "---- Agents ----"
+    agents.each do |a|
+      puts "  => #{a.label}"
+    end
+    puts "----"
+
+    for idx in 0...20
+      blist = @qmfc.get_objects(Qmf::Query.new(:class => "broker"))
+      puts "---- Brokers ----"
+      blist.each do |b|
+        puts "    ---- Broker ----"
+        puts "    systemRef: #{b.get_attr('systemRef')}"
+        puts "    port     : #{b.get_attr('port')}"
+        puts "    uptime   : #{b.get_attr('uptime') / 1000000000}"
+      end
+      puts "----"
+      sleep(5)
+    end
 
+    sleep(5)
+    puts "Deleting connection..."
+    @qmfc.del_connection(@broker)
+    puts "    done"
     sleep
   end
 end

Modified: qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Receiver.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Receiver.h?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Receiver.h (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Receiver.h Thu Sep 17 16:21:13 2009
@@ -40,7 +40,7 @@
 class ReceiverImpl;
 
 /**
- * A pull style interface for message retrieval.
+ * Interface through which messages are received.
  */
 class Receiver : public qpid::client::Handle<ReceiverImpl>
 {
@@ -75,7 +75,7 @@
     QPID_CLIENT_EXTERN bool fetch(Message& message, qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE);
     /**
      * Retrieves a message for this receivers subscription or waits
-     * for upto the specified timeout for one to become
+     * for up to the specified timeout for one to become
      * available. Unlike get() this method will check with the server
      * that there is no message for the subscription this receiver is
      * serving before throwing an exception.
@@ -87,8 +87,8 @@
      */
     QPID_CLIENT_EXTERN void start();
     /**
-     * Stops the message flow for this receiver (without actually
-     * cancelling the subscription).
+     * Stops the message flow for this receiver (but does not cancel
+     * the subscription).
      */
     QPID_CLIENT_EXTERN void stop();
     /**
@@ -97,14 +97,35 @@
      * requested by a client via fetch() (or pushed to a listener).
      */
     QPID_CLIENT_EXTERN void setCapacity(uint32_t);
+    /**
+     * Returns the capacity of the receiver. The capacity determines
+     * how many incoming messages can be held in the receiver before
+     * being requested by a client via fetch() (or pushed to a
+     * listener).
+     */
+    QPID_CLIENT_EXTERN uint32_t getCapacity();
+    /**
+     * Returns the number of messages received and waiting to be
+     * fetched.
+     */
+    QPID_CLIENT_EXTERN uint32_t available();
+    /**
+     * Returns a count of the number of messages received on this
+     * receiver that have been acknowledged, but for which that
+     * acknowledgement has not yet been confirmed as processed by the
+     * server.
+     */
+    QPID_CLIENT_EXTERN uint32_t pendingAck();
 
     /**
-     * Cancels this receiver
+     * Cancels this receiver.
      */
     QPID_CLIENT_EXTERN void cancel();
 
     /**
-     * Set a message listener for receiving messages asynchronously.
+     * Set a message listener for this receiver.
+     * 
+     * @see Session::dispatch()
      */
     QPID_CLIENT_EXTERN void setListener(MessageListener* listener);
   private:

Modified: qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Sender.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Sender.h?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Sender.h (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Sender.h Thu Sep 17 16:21:13 2009
@@ -23,6 +23,7 @@
  */
 #include "qpid/client/ClientImportExport.h"
 #include "qpid/client/Handle.h"
+#include "qpid/sys/IntegerTypes.h"
 
 namespace qpid {
 namespace client {
@@ -49,6 +50,24 @@
 
     QPID_CLIENT_EXTERN void send(const Message& message);
     QPID_CLIENT_EXTERN void cancel();
+
+    /**
+     * Sets the capacity for the sender. The capacity determines how
+     * many outgoing messages can be held pending confirmation of
+     * receipt by the broker.
+     */
+    QPID_CLIENT_EXTERN void setCapacity(uint32_t);
+    /**
+     * Returns the capacity of the sender. 
+     * @see setCapacity
+     */
+    QPID_CLIENT_EXTERN uint32_t getCapacity();
+    /**
+     * Returns the number of sent messages pending confirmation of
+     * receipt by the broker. (These are the 'in-doubt' messages).
+     */
+    QPID_CLIENT_EXTERN uint32_t pending();
+
   private:
   friend class qpid::client::PrivateImplRef<Sender>;
 };

Modified: qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Session.h
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Session.h?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Session.h (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/include/qpid/messaging/Session.h Thu Sep 17 16:21:13 2009
@@ -75,6 +75,17 @@
     QPID_CLIENT_EXTERN void sync();
     QPID_CLIENT_EXTERN void flush();
 
+    /**
+     * Returns the number of messages received and waiting to be
+     * fetched.
+     */
+    QPID_CLIENT_EXTERN uint32_t available();
+    /**
+     * Returns a count of the number of messages received this session
+     * that have been acknowledged, but for which that acknowledgement
+     * has not yet been confirmed as processed by the server.
+     */
+    QPID_CLIENT_EXTERN uint32_t pendingAck();
     QPID_CLIENT_EXTERN bool fetch(Message& message, qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE);
     QPID_CLIENT_EXTERN Message fetch(qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE);
     QPID_CLIENT_EXTERN bool dispatch(qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE);
@@ -88,9 +99,6 @@
     QPID_CLIENT_EXTERN Receiver createReceiver(const std::string& address, const Filter& filter, const VariantMap& options = VariantMap());
 
     QPID_CLIENT_EXTERN Address createTempQueue(const std::string& baseName = std::string());
-
-    QPID_CLIENT_EXTERN void* getLastConfirmedSent();
-    QPID_CLIENT_EXTERN void* getLastConfirmedAcknowledged();
   private:
   friend class qpid::client::PrivateImplRef<Session>;
 };

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt Thu Sep 17 16:21:13 2009
@@ -537,12 +537,12 @@
      qpid/messaging/Sender.cpp
      qpid/messaging/SenderImpl.h
      qpid/messaging/Variant.cpp
+     qpid/client/amqp0_10/AcceptTracker.h
+     qpid/client/amqp0_10/AcceptTracker.cpp
      qpid/client/amqp0_10/AddressResolution.h
      qpid/client/amqp0_10/AddressResolution.cpp
      qpid/client/amqp0_10/Codecs.cpp
      qpid/client/amqp0_10/CodecsInternal.h
-     qpid/client/amqp0_10/CompletionTracker.h
-     qpid/client/amqp0_10/CompletionTracker.cpp
      qpid/client/amqp0_10/ConnectionImpl.h
      qpid/client/amqp0_10/ConnectionImpl.cpp
      qpid/client/amqp0_10/IncomingMessages.h

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/Makefile.am?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/Makefile.am (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/Makefile.am Thu Sep 17 16:21:13 2009
@@ -697,14 +697,14 @@
   qpid/messaging/SenderImpl.h			\
   qpid/messaging/ReceiverImpl.h			\
   qpid/messaging/SessionImpl.h			\
+  qpid/client/amqp0_10/AcceptTracker.h		\
+  qpid/client/amqp0_10/AcceptTracker.cpp	\
   qpid/client/amqp0_10/AddressResolution.h	\
   qpid/client/amqp0_10/AddressResolution.cpp	\
   qpid/client/amqp0_10/Codecs.cpp		\
   qpid/client/amqp0_10/CodecsInternal.h		\
   qpid/client/amqp0_10/ConnectionImpl.h	        \
   qpid/client/amqp0_10/ConnectionImpl.cpp	\
-  qpid/client/amqp0_10/CompletionTracker.h	\
-  qpid/client/amqp0_10/CompletionTracker.cpp	\
   qpid/client/amqp0_10/IncomingMessages.h	\
   qpid/client/amqp0_10/IncomingMessages.cpp	\
   qpid/client/amqp0_10/MessageSink.h		\

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.cpp?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.cpp Thu Sep 17 16:21:13 2009
@@ -57,7 +57,7 @@
         string      name;
         Object*     object;
         boost::shared_ptr<ObjectId> objectId;
-        Query       query;
+        boost::shared_ptr<Query> query;
         boost::shared_ptr<Value> arguments;
         string      exchange;
         string      bindingKey;
@@ -214,7 +214,7 @@
     item.sequence  = sequence;
     item.object    = object;
     item.objectId  = objectId.get();
-    item.query     = &query;
+    item.query     = query.get();
     item.arguments = arguments.get();
     item.objectClass = objectClass;
 
@@ -381,7 +381,7 @@
         }
     }
     sendBufferLH(buffer, context->exchange, context->key);
-    QPID_LOG(trace, "SENT MethodResponse");
+    QPID_LOG(trace, "SENT MethodResponse seq=" << context->sequence << " status=" << status << " text=" << text);
 }
 
 void AgentEngineImpl::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat)
@@ -403,7 +403,7 @@
         object.impl->encodeStatistics(buffer);
     
     sendBufferLH(buffer, context->exchange, context->key);
-    QPID_LOG(trace, "SENT ContentIndication");
+    QPID_LOG(trace, "SENT ContentIndication seq=" << context->sequence);
 }
 
 void AgentEngineImpl::queryComplete(uint32_t sequence)
@@ -511,9 +511,10 @@
     AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::GET_QUERY));
     event->sequence = num;
     event->authUserId = userId;
-    event->query.impl->packageName = package;    
-    event->query.impl->className = cls;
-    event->query.impl->oid = oid;
+    if (oid.get())
+        event->query.reset(new Query(oid.get()));
+    else
+        event->query.reset(new Query(cls.c_str(), package.c_str()));
     return event;
 }
 
@@ -723,7 +724,7 @@
 
     ft.decode(inBuffer);
     
-    QPID_LOG(trace, "RCVD GetQuery: map=" << ft);
+    QPID_LOG(trace, "RCVD GetQuery: seq=" << sequence << " map=" << ft);
 
     value = ft.get("_package");
     if (value.get() && value->convertsTo<string>()) {
@@ -773,6 +774,8 @@
     AgentClassKey classKey(buffer);
     buffer.getShortString(method);
 
+    QPID_LOG(trace, "RCVD MethodRequest seq=" << sequence << " method=" << method);
+
     map<string, ClassMaps>::const_iterator pIter = packages.find(pname);
     if (pIter == packages.end()) {
         sendMethodErrorLH(sequence, replyTo, MERR_UNKNOWN_PACKAGE, pname);

Propchange: qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -0,0 +1 @@
+/incubator/qpid/trunk/qpid/cpp/src/qmf/AgentEngine.cpp:443187-726139

Propchange: qpid/branches/java-network-refactor/qpid/cpp/src/qmf/AgentEngine.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -0,0 +1 @@
+/incubator/qpid/trunk/qpid/cpp/src/qmf/AgentEngine.h:443187-726139

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ConsoleEngine.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ConsoleEngine.cpp?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ConsoleEngine.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/qmf/ConsoleEngine.cpp Thu Sep 17 16:21:13 2009
@@ -34,6 +34,7 @@
 #include <qpid/sys/Mutex.h>
 #include <qpid/log/Statement.h>
 #include <qpid/sys/Time.h>
+#include <qpid/sys/SystemInfo.h>
 #include <string.h>
 #include <string>
 #include <deque>
@@ -58,12 +59,27 @@
         auto_ptr<Value> arguments;
 
         MethodResponseImpl(Buffer& buf);
-        ~MethodResponseImpl() {}
+        ~MethodResponseImpl() { delete envelope; }
         uint32_t getStatus() const { return status; }
         const Value* getException() const { return exception.get(); }
         const Value* getArgs() const { return arguments.get(); }
     };
 
+    struct QueryResponseImpl {
+        typedef boost::shared_ptr<QueryResponseImpl> Ptr;
+        QueryResponse *envelope;
+        uint32_t status;
+        auto_ptr<Value> exception;
+        vector<ObjectImpl::Ptr> results;
+
+        QueryResponseImpl() : envelope(new QueryResponse(this)), status(0) {}
+        ~QueryResponseImpl() { delete envelope; }
+        uint32_t getStatus() const { return status; }
+        const Value* getException() const { return exception.get(); }
+        uint32_t getObjectCount() const { return results.size(); }
+        const Object* getObject(uint32_t idx) const;
+    };
+
     struct ConsoleEventImpl {
         typedef boost::shared_ptr<ConsoleEventImpl> Ptr;
         ConsoleEvent::EventKind kind;
@@ -89,13 +105,29 @@
         string name;
         string exchange;
         string bindingKey;
+        void* context;
+        QueryResponseImpl::Ptr queryResponse;
 
         BrokerEventImpl(BrokerEvent::EventKind k) : kind(k) {}
         ~BrokerEventImpl() {}
         BrokerEvent copy();
     };
 
-    class BrokerProxyImpl : public SequenceContext {
+    struct AgentProxyImpl {
+        typedef boost::shared_ptr<AgentProxyImpl> Ptr;
+        AgentProxy* envelope;
+        ConsoleEngineImpl* console;
+        BrokerProxyImpl* broker;
+        uint32_t agentBank;
+        string label;
+
+        AgentProxyImpl(ConsoleEngineImpl* c, BrokerProxyImpl* b, uint32_t ab, const string& l) :
+            envelope(new AgentProxy(this)), console(c), broker(b), agentBank(ab), label(l) {}
+        ~AgentProxyImpl() {}
+        const string& getLabel() const { return label; }
+    };
+
+    class BrokerProxyImpl {
     public:
         typedef boost::shared_ptr<BrokerProxyImpl> Ptr;
 
@@ -114,12 +146,17 @@
         bool getEvent(BrokerEvent& event) const;
         void popEvent();
 
-        // From SequenceContext
-        void complete();
+        uint32_t agentCount() const;
+        const AgentProxy* getAgent(uint32_t idx) const;
+        void sendQuery(const Query& query, void* context, const AgentProxy* agent);
+        void sendGetRequestLH(SequenceContext::Ptr queryContext, const Query& query, const AgentProxyImpl* agent);
 
         void addBinding(const string& exchange, const string& key);
+        void staticRelease() { decOutstanding(); }
 
     private:
+        friend class StaticContext;
+        friend class QueryContext;
         mutable Mutex lock;
         BrokerProxy* envelope;
         ConsoleEngineImpl* console;
@@ -128,6 +165,7 @@
         SequenceManager seqMgr;
         uint32_t requestsOutstanding;
         bool topicBound;
+        vector<AgentProxyImpl::Ptr> agentList;
         deque<MessageImpl::Ptr> xmtQueue;
         deque<BrokerEventImpl::Ptr> eventQueue;
 
@@ -138,6 +176,7 @@
         BrokerEventImpl::Ptr eventBind(const string& exchange, const string& queue, const string& key);
         BrokerEventImpl::Ptr eventSetupComplete();
         BrokerEventImpl::Ptr eventStable();
+        BrokerEventImpl::Ptr eventQueryComplete(void* context, QueryResponseImpl::Ptr response);
 
         void handleBrokerResponse(Buffer& inBuffer, uint32_t seq);
         void handlePackageIndication(Buffer& inBuffer, uint32_t seq);
@@ -147,19 +186,33 @@
         void handleHeartbeatIndication(Buffer& inBuffer, uint32_t seq);
         void handleEventIndication(Buffer& inBuffer, uint32_t seq);
         void handleSchemaResponse(Buffer& inBuffer, uint32_t seq);
-        void handleObjectIndication(Buffer& inBuffer, uint32_t seq, bool prop, bool stat);
+        ObjectImpl::Ptr handleObjectIndication(Buffer& inBuffer, uint32_t seq, bool prop, bool stat);
         void incOutstandingLH();
         void decOutstanding();
     };
 
-    struct AgentProxyImpl {
-        typedef boost::shared_ptr<AgentProxyImpl> Ptr;
-        AgentProxy* envelope;
-        ConsoleEngineImpl* console;
+    struct StaticContext : public SequenceContext {
+        StaticContext(BrokerProxyImpl& b) : broker(b) {}
+        ~StaticContext() {}
+        void reserve() {}
+        void release() { broker.staticRelease(); }
+        bool handleMessage(uint8_t opcode, uint32_t sequence, Buffer& buffer);
+        BrokerProxyImpl& broker;
+    };
 
-        AgentProxyImpl(AgentProxy* e, ConsoleEngine& _console) :
-            envelope(e), console(_console.impl) {}
-        ~AgentProxyImpl() {}
+    struct QueryContext : public SequenceContext {
+        QueryContext(BrokerProxyImpl& b, void* u) :
+            broker(b), userContext(u), requestsOutstanding(0), queryResponse(new QueryResponseImpl()) {}
+        ~QueryContext() {}
+        void reserve();
+        void release();
+        bool handleMessage(uint8_t opcode, uint32_t sequence, Buffer& buffer);
+
+        mutable Mutex lock;
+        BrokerProxyImpl& broker;
+        void* userContext;
+        uint32_t requestsOutstanding;
+        QueryResponseImpl::Ptr queryResponse;
     };
 
     class ConsoleEngineImpl {
@@ -187,11 +240,6 @@
         void bindClass(const SchemaClassKey* key);
         void bindClass(const char* packageName, const char* className);
 
-        uint32_t agentCount() const;
-        const AgentProxy* getAgent(uint32_t idx) const;
-
-        void sendQuery(const Query& query, void* context);
-
         /*
         void startSync(const Query& query, void* context, SyncQuery& sync);
         void touchSync(SyncQuery& sync);
@@ -226,13 +274,31 @@
         void learnClass(SchemaObjectClassImpl::Ptr cls);
         void learnClass(SchemaEventClassImpl::Ptr cls);
         bool haveClass(const SchemaClassKeyImpl& key) const;
+        SchemaObjectClassImpl::Ptr getSchema(const SchemaClassKeyImpl& key) const;
     };
 }
 
 namespace {
-const char* QMF_EXCHANGE = "qpid.management";
-const char* DIR_EXCHANGE = "amq.direct";
-const char* BROKER_KEY   = "broker";
+    const char* QMF_EXCHANGE     = "qpid.management";
+    const char* DIR_EXCHANGE     = "amq.direct";
+    const char* BROKER_KEY       = "broker";
+    const char* BROKER_PACKAGE   = "org.apache.qpid.broker";
+    const char* AGENT_CLASS      = "agent";
+    const char* BROKER_AGENT_KEY = "agent.1.0";
+}
+
+const Object* QueryResponseImpl::getObject(uint32_t idx) const
+{
+    vector<ObjectImpl::Ptr>::const_iterator iter = results.begin();
+
+    while (idx > 0) {
+        if (iter == results.end())
+            return 0;
+        iter++;
+        idx--;
+    }
+
+    return (*iter)->envelope;
 }
 
 #define STRING_REF(s) {if (!s.empty()) item.s = const_cast<char*>(s.c_str());}
@@ -267,19 +333,29 @@
     STRING_REF(name);
     STRING_REF(exchange);
     STRING_REF(bindingKey);
+    item.context = context;
+    item.queryResponse = queryResponse.get() ? queryResponse->envelope : 0;
 
     return item;
 }
 
 BrokerProxyImpl::BrokerProxyImpl(BrokerProxy* e, ConsoleEngine& _console) :
-    envelope(e), console(_console.impl), queueName("qmfc-")
+    envelope(e), console(_console.impl)
 {
-    // TODO: Give the queue name a unique suffix
+    stringstream qn;
+    qpid::TcpAddress addr;
+
+    SystemInfo::getLocalHostname(addr);
+    qn << "qmfc-" << SystemInfo::getProcessName() << "-" << addr << "-" << SystemInfo::getProcessId();
+    queueName = qn.str();
+
+    seqMgr.setUnsolicitedContext(SequenceContext::Ptr(new StaticContext(*this)));
 }
 
 void BrokerProxyImpl::sessionOpened(SessionHandle& /*sh*/)
 {
     Mutex::ScopedLock _lock(lock);
+    agentList.clear();
     eventQueue.clear();
     xmtQueue.clear();
     eventQueue.push_back(eventDeclareQueue(queueName));
@@ -292,6 +368,7 @@
 void BrokerProxyImpl::sessionClosed()
 {
     Mutex::ScopedLock _lock(lock);
+    agentList.clear();
     eventQueue.clear();
     xmtQueue.clear();
 }
@@ -302,11 +379,14 @@
     char rawbuffer[512];
     Buffer buffer(rawbuffer, 512);
 
+    agentList.push_back(AgentProxyImpl::Ptr(new AgentProxyImpl(console, this, 0, "Agent embedded in broker")));
+
     requestsOutstanding = 1;
     topicBound = false;
-    Protocol::encodeHeader(buffer, Protocol::OP_BROKER_REQUEST);
+    uint32_t sequence(seqMgr.reserve());
+    Protocol::encodeHeader(buffer, Protocol::OP_BROKER_REQUEST, sequence);
     sendBufferLH(buffer, QMF_EXCHANGE, BROKER_KEY);
-    QPID_LOG(trace, "SENT BrokerRequest");
+    QPID_LOG(trace, "SENT BrokerRequest seq=" << sequence);
 }
 
 void BrokerProxyImpl::sendBufferLH(Buffer& buf, const string& destination, const string& routingKey)
@@ -330,23 +410,8 @@
     uint8_t opcode;
     uint32_t sequence;
 
-    while (Protocol::checkHeader(inBuffer, &opcode, &sequence)) {
-        if      (opcode == Protocol::OP_BROKER_RESPONSE)      handleBrokerResponse(inBuffer, sequence);
-        else if (opcode == Protocol::OP_PACKAGE_INDICATION)   handlePackageIndication(inBuffer, sequence);
-        else if (opcode == Protocol::OP_COMMAND_COMPLETE)     handleCommandComplete(inBuffer, sequence);
-        else if (opcode == Protocol::OP_CLASS_INDICATION)     handleClassIndication(inBuffer, sequence);
-        else if (opcode == Protocol::OP_METHOD_RESPONSE)      handleMethodResponse(inBuffer, sequence);
-        else if (opcode == Protocol::OP_HEARTBEAT_INDICATION) handleHeartbeatIndication(inBuffer, sequence);
-        else if (opcode == Protocol::OP_EVENT_INDICATION)     handleEventIndication(inBuffer, sequence);
-        else if (opcode == Protocol::OP_SCHEMA_RESPONSE)      handleSchemaResponse(inBuffer, sequence);
-        else if (opcode == Protocol::OP_PROPERTY_INDICATION)  handleObjectIndication(inBuffer, sequence, true,  false);
-        else if (opcode == Protocol::OP_STATISTIC_INDICATION) handleObjectIndication(inBuffer, sequence, false, true);
-        else if (opcode == Protocol::OP_OBJECT_INDICATION)    handleObjectIndication(inBuffer, sequence, true,  true);
-        else {
-            QPID_LOG(trace, "BrokerProxyImpl::handleRcvMessage invalid opcode: " << opcode);
-            break;
-        }
-    }
+    while (Protocol::checkHeader(inBuffer, &opcode, &sequence))
+        seqMgr.dispatch(opcode, sequence, inBuffer);
 }
 
 bool BrokerProxyImpl::getXmtMessage(Message& item) const
@@ -381,9 +446,48 @@
         eventQueue.pop_front();
 }
 
-void BrokerProxyImpl::complete()
+uint32_t BrokerProxyImpl::agentCount() const
+{
+    Mutex::ScopedLock _lock(lock);
+    return agentList.size();
+}
+
+const AgentProxy* BrokerProxyImpl::getAgent(uint32_t idx) const
+{
+    Mutex::ScopedLock _lock(lock);
+    for (vector<AgentProxyImpl::Ptr>::const_iterator iter = agentList.begin();
+         iter != agentList.end(); iter++)
+        if (idx-- == 0)
+            return (*iter)->envelope;
+    return 0;
+}
+
+void BrokerProxyImpl::sendQuery(const Query& query, void* context, const AgentProxy* agent)
+{
+    SequenceContext::Ptr queryContext(new QueryContext(*this, context));
+    Mutex::ScopedLock _lock(lock);
+    if (agent != 0) {
+        sendGetRequestLH(queryContext, query, agent->impl);
+    } else {
+        // TODO (optimization) only send queries to agents that have the requested class+package
+        for (vector<AgentProxyImpl::Ptr>::const_iterator iter = agentList.begin();
+             iter != agentList.end(); iter++) {
+            sendGetRequestLH(queryContext, query, (*iter).get());
+        }
+    }
+}
+
+void BrokerProxyImpl::sendGetRequestLH(SequenceContext::Ptr queryContext, const Query& query, const AgentProxyImpl* agent)
 {
-    decOutstanding();
+    stringstream key;
+    Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE);
+    uint32_t sequence(seqMgr.reserve(queryContext));
+
+    Protocol::encodeHeader(outBuffer, Protocol::OP_GET_QUERY, sequence);
+    query.impl->encode(outBuffer);
+    key << "agent.1." << agent->agentBank;
+    sendBufferLH(outBuffer, QMF_EXCHANGE, key.str());
+    QPID_LOG(trace, "SENT GetQuery seq=" << sequence << " key=" << key.str());
 }
 
 void BrokerProxyImpl::addBinding(const string& exchange, const string& key)
@@ -420,17 +524,22 @@
     return event;
 }
 
-void BrokerProxyImpl::handleBrokerResponse(Buffer& inBuffer, uint32_t seq)
+BrokerEventImpl::Ptr BrokerProxyImpl::eventQueryComplete(void* context, QueryResponseImpl::Ptr response)
 {
-    // Note that this function doesn't touch requestsOutstanding.  This is because
-    // it accounts for one request completed (the BrokerRequest) and one request
-    // started (the PackageRequest) which cancel each other out.
+    BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::QUERY_COMPLETE));
+    event->context = context;
+    event->queryResponse = response;
+    return event;
+}
 
+void BrokerProxyImpl::handleBrokerResponse(Buffer& inBuffer, uint32_t seq)
+{
     brokerId.decode(inBuffer);
     QPID_LOG(trace, "RCVD BrokerResponse seq=" << seq << " brokerId=" << brokerId);
     Mutex::ScopedLock _lock(lock);
     Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE);
-    uint32_t sequence(seqMgr.reserve(this));
+    uint32_t sequence(seqMgr.reserve());
+    incOutstandingLH();
     Protocol::encodeHeader(outBuffer, Protocol::OP_PACKAGE_REQUEST, sequence);
     sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_KEY);
     QPID_LOG(trace, "SENT PackageRequest seq=" << sequence);
@@ -446,7 +555,7 @@
 
     Mutex::ScopedLock _lock(lock);
     Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE);
-    uint32_t sequence(seqMgr.reserve(this));
+    uint32_t sequence(seqMgr.reserve());
     incOutstandingLH();
     Protocol::encodeHeader(outBuffer, Protocol::OP_CLASS_QUERY, sequence);
     outBuffer.putShortString(package);
@@ -460,20 +569,12 @@
     uint32_t code = inBuffer.getLong();
     inBuffer.getShortString(text);
     QPID_LOG(trace, "RCVD CommandComplete seq=" << seq << " code=" << code << " text=" << text);
-    seqMgr.release(seq);
 }
 
 void BrokerProxyImpl::handleClassIndication(Buffer& inBuffer, uint32_t seq)
 {
-    string package;
-    string clsName;
-    SchemaHash hash;
     uint8_t kind = inBuffer.getOctet();
-    inBuffer.getShortString(package);
-    inBuffer.getShortString(clsName);
-    hash.decode(inBuffer);
-    Uuid printableHash(hash.get());
-    SchemaClassKeyImpl classKey(package, clsName, hash);
+    SchemaClassKeyImpl classKey(inBuffer);
 
     QPID_LOG(trace, "RCVD ClassIndication seq=" << seq << " kind=" << (int) kind << " key=" << classKey.str());
 
@@ -481,7 +582,7 @@
         Mutex::ScopedLock _lock(lock);
         incOutstandingLH();
         Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE);
-        uint32_t sequence(seqMgr.reserve(this));
+        uint32_t sequence(seqMgr.reserve());
         Protocol::encodeHeader(outBuffer, Protocol::OP_SCHEMA_REQUEST, sequence);
         classKey.encode(outBuffer);
         sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_KEY);
@@ -515,6 +616,25 @@
         console->learnClass(oClassPtr);
         key = oClassPtr->getClassKey()->impl;
         QPID_LOG(trace, "RCVD SchemaResponse seq=" << seq << " kind=object key=" << key->str());
+
+        //
+        // If we have just learned about the org.apache.qpid.broker:agent class, send a get
+        // request for the current list of agents so we can have it on-hand before we declare
+        // this session "stable".
+        //
+        if (key->getClassName() == AGENT_CLASS && key->getPackageName() == BROKER_PACKAGE) {
+            Mutex::ScopedLock _lock(lock);
+            incOutstandingLH();
+            Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE);
+            uint32_t sequence(seqMgr.reserve());
+            Protocol::encodeHeader(outBuffer, Protocol::OP_GET_QUERY, sequence);
+            FieldTable ft;
+            ft.setString("_class", AGENT_CLASS);
+            ft.setString("_package", BROKER_PACKAGE);
+            ft.encode(outBuffer);
+            sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_AGENT_KEY);
+            QPID_LOG(trace, "SENT GetQuery seq=" << sequence << " key=" << BROKER_AGENT_KEY);
+        }
     } else if (kind == CLASS_EVENT) {
         eClassPtr.reset(new SchemaEventClassImpl(inBuffer));
         console->learnClass(eClassPtr);
@@ -524,13 +644,20 @@
     else {
         QPID_LOG(error, "BrokerProxyImpl::handleSchemaResponse received unknown class kind: " << (int) kind);
     }
-
-    decOutstanding();
 }
 
-void BrokerProxyImpl::handleObjectIndication(Buffer& /*inBuffer*/, uint32_t /*seq*/, bool /*prop*/, bool /*stat*/)
+ObjectImpl::Ptr BrokerProxyImpl::handleObjectIndication(Buffer& inBuffer, uint32_t seq, bool prop, bool stat)
 {
-    // TODO
+    SchemaClassKeyImpl classKey(inBuffer);
+    QPID_LOG(trace, "RCVD ObjectIndication seq=" << seq << " key=" << classKey.str());
+
+    SchemaObjectClassImpl::Ptr schema = console->getSchema(classKey);
+    if (schema.get() == 0) {
+        QPID_LOG(trace, "No Schema Found for ObjectIndication. seq=" << seq << " key=" << classKey.str());
+        return ObjectImpl::Ptr();
+    }
+
+    return ObjectImpl::Ptr(new ObjectImpl(schema->envelope, inBuffer, prop, stat, true));
 }
 
 void BrokerProxyImpl::incOutstandingLH()
@@ -567,6 +694,79 @@
     arguments.reset(new Value(TYPE_MAP));
 }
 
+bool StaticContext::handleMessage(uint8_t opcode, uint32_t sequence, Buffer& buffer)
+{
+    bool completeContext = false;
+    if      (opcode == Protocol::OP_BROKER_RESPONSE) {
+        broker.handleBrokerResponse(buffer, sequence);
+        completeContext = true;
+    }
+    else if (opcode == Protocol::OP_COMMAND_COMPLETE) {
+        broker.handleCommandComplete(buffer, sequence);
+        completeContext = true;
+    }
+    else if (opcode == Protocol::OP_SCHEMA_RESPONSE) {
+        broker.handleSchemaResponse(buffer, sequence);
+        completeContext = true;
+    }
+    else if (opcode == Protocol::OP_PACKAGE_INDICATION)
+        broker.handlePackageIndication(buffer, sequence);
+    else if (opcode == Protocol::OP_CLASS_INDICATION)
+        broker.handleClassIndication(buffer, sequence);
+    else if (opcode == Protocol::OP_HEARTBEAT_INDICATION)
+        broker.handleHeartbeatIndication(buffer, sequence);
+    else if (opcode == Protocol::OP_EVENT_INDICATION)
+        broker.handleEventIndication(buffer, sequence);
+    else if (opcode == Protocol::OP_PROPERTY_INDICATION)
+        broker.handleObjectIndication(buffer, sequence, true,  false);
+    else if (opcode == Protocol::OP_STATISTIC_INDICATION)
+        broker.handleObjectIndication(buffer, sequence, false, true);
+    else if (opcode == Protocol::OP_OBJECT_INDICATION)
+        broker.handleObjectIndication(buffer, sequence, true,  true);
+    else {
+        QPID_LOG(trace, "StaticContext::handleMessage invalid opcode: " << opcode);
+        completeContext = true;
+    }
+
+    return completeContext;
+}
+
+void QueryContext::reserve()
+{
+    Mutex::ScopedLock _lock(lock);
+    requestsOutstanding++;
+}
+
+void QueryContext::release()
+{
+    Mutex::ScopedLock _lock(lock);
+    if (--requestsOutstanding == 0) {
+        broker.eventQueue.push_back(broker.eventQueryComplete(userContext, queryResponse));
+    }
+}
+
+bool QueryContext::handleMessage(uint8_t opcode, uint32_t sequence, Buffer& buffer)
+{
+    bool completeContext = false;
+    ObjectImpl::Ptr object;
+
+    if      (opcode == Protocol::OP_COMMAND_COMPLETE) {
+        broker.handleCommandComplete(buffer, sequence);
+        completeContext = true;
+    }
+    else if (opcode == Protocol::OP_OBJECT_INDICATION) {
+        object = broker.handleObjectIndication(buffer, sequence, true,  true);
+        if (object.get() != 0)
+            queryResponse->results.push_back(object);
+    }
+    else {
+        QPID_LOG(trace, "QueryContext::handleMessage invalid opcode: " << opcode);
+        completeContext = true;
+    }
+
+    return completeContext;
+}
+
 ConsoleEngineImpl::ConsoleEngineImpl(ConsoleEngine* e, const ConsoleSettings& s) :
     envelope(e), settings(s)
 {
@@ -757,23 +957,6 @@
         (*iter)->addBinding(QMF_EXCHANGE, key.str());
 }
 
-uint32_t ConsoleEngineImpl::agentCount() const
-{
-    // TODO
-    return 0;
-}
-
-const AgentProxy* ConsoleEngineImpl::getAgent(uint32_t /*idx*/) const
-{
-    // TODO
-    return 0;
-}
-
-void ConsoleEngineImpl::sendQuery(const Query& /*query*/, void* /*context*/)
-{
-    // TODO
-}
-
 /*
 void ConsoleEngineImpl::startSync(const Query& query, void* context, SyncQuery& sync)
 {
@@ -835,11 +1018,29 @@
     return oList.find(&key) != oList.end() || eList.find(&key) != eList.end();
 }
 
+SchemaObjectClassImpl::Ptr ConsoleEngineImpl::getSchema(const SchemaClassKeyImpl& key) const
+{
+    Mutex::ScopedLock _lock(lock);
+    PackageList::const_iterator pIter = packages.find(key.getPackageName());
+    if (pIter == packages.end())
+        return SchemaObjectClassImpl::Ptr();
+
+    const ObjectClassList& oList = pIter->second.first;
+    ObjectClassList::const_iterator iter = oList.find(&key);
+    if (iter == oList.end())
+        return SchemaObjectClassImpl::Ptr();
+
+    return iter->second;
+}
 
 //==================================================================
 // Wrappers
 //==================================================================
 
+AgentProxy::AgentProxy(AgentProxyImpl* i) : impl(i) {}
+AgentProxy::~AgentProxy() { delete impl; }
+const char* AgentProxy::getLabel() const { return impl->getLabel().c_str(); }
+
 BrokerProxy::BrokerProxy(ConsoleEngine& console) : impl(new BrokerProxyImpl(this, console)) {}
 BrokerProxy::~BrokerProxy() { delete impl; }
 void BrokerProxy::sessionOpened(SessionHandle& sh) { impl->sessionOpened(sh); }
@@ -850,16 +1051,23 @@
 void BrokerProxy::popXmt() { impl->popXmt(); }
 bool BrokerProxy::getEvent(BrokerEvent& event) const { return impl->getEvent(event); }
 void BrokerProxy::popEvent() { impl->popEvent(); }
-
-AgentProxy::AgentProxy(ConsoleEngine& console) : impl(new AgentProxyImpl(this, console)) {}
-AgentProxy::~AgentProxy() { delete impl; }
+uint32_t BrokerProxy::agentCount() const { return impl->agentCount(); }
+const AgentProxy* BrokerProxy::getAgent(uint32_t idx) const { return impl->getAgent(idx); }
+void BrokerProxy::sendQuery(const Query& query, void* context, const AgentProxy* agent) { impl->sendQuery(query, context, agent); }
 
 MethodResponse::MethodResponse(MethodResponseImpl* i) : impl(i) {}
-MethodResponse::~MethodResponse() { delete impl; } // TODO: correct to delete here?
+MethodResponse::~MethodResponse() {}
 uint32_t MethodResponse::getStatus() const { return impl->getStatus(); }
 const Value* MethodResponse::getException() const { return impl->getException(); }
 const Value* MethodResponse::getArgs() const { return impl->getArgs(); }
 
+QueryResponse::QueryResponse(QueryResponseImpl* i) : impl(i) {}
+QueryResponse::~QueryResponse() {}
+uint32_t QueryResponse::getStatus() const { return impl->getStatus(); }
+const Value* QueryResponse::getException() const { return impl->getException(); }
+uint32_t QueryResponse::getObjectCount() const { return impl->getObjectCount(); }
+const Object* QueryResponse::getObject(uint32_t idx) const { return impl->getObject(idx); }
+
 ConsoleEngine::ConsoleEngine(const ConsoleSettings& settings) : impl(new ConsoleEngineImpl(this, settings)) {}
 ConsoleEngine::~ConsoleEngine() { delete impl; }
 bool ConsoleEngine::getEvent(ConsoleEvent& event) const { return impl->getEvent(event); }
@@ -876,9 +1084,6 @@
 void ConsoleEngine::bindPackage(const char* packageName) { impl->bindPackage(packageName); }
 void ConsoleEngine::bindClass(const SchemaClassKey* key) { impl->bindClass(key); }
 void ConsoleEngine::bindClass(const char* packageName, const char* className) { impl->bindClass(packageName, className); }
-uint32_t ConsoleEngine::agentCount() const { return impl->agentCount(); }
-const AgentProxy* ConsoleEngine::getAgent(uint32_t idx) const { return impl->getAgent(idx); }
-void ConsoleEngine::sendQuery(const Query& query, void* context) { impl->sendQuery(query, context); }
 //void ConsoleEngine::startSync(const Query& query, void* context, SyncQuery& sync) { impl->startSync(query, context, sync); }
 //void ConsoleEngine::touchSync(SyncQuery& sync) { impl->touchSync(sync); }
 //void ConsoleEngine::endSync(SyncQuery& sync) { impl->endSync(sync); }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message