You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2011/02/08 17:16:56 UTC
svn commit: r1068464 [1/6] - in /qpid/branches/qpid-2935/qpid: ./ bin/ cpp/
cpp/bindings/ cpp/bindings/qmf2/examples/cpp/
cpp/bindings/qmf2/examples/python/ cpp/bindings/qmf2/examples/ruby/
cpp/bindings/qmf2/python/ cpp/bindings/qmf2/ruby/ cpp/bindings...
Author: kgiusti
Date: Tue Feb 8 16:16:49 2011
New Revision: 1068464
URL: http://svn.apache.org/viewvc?rev=1068464&view=rev
Log:
QPID-2935: resync with latest trunk
Added:
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/python/find_agents.py
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qmf2/examples/python/find_agents.py
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/ruby/
- copied from r1068442, qpid/trunk/qpid/cpp/bindings/qmf2/examples/ruby/
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/ruby/agent_external.rb
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qmf2/examples/ruby/agent_external.rb
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/ruby/agent_internal.rb
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qmf2/examples/ruby/agent_internal.rb
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/ruby/find_agents.rb
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qmf2/examples/ruby/find_agents.rb
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/
- copied from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/
- copied from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/README
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/README
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/client.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/client.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/drain.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/drain.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/hello_world.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/hello_world.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/hello_xml.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/hello_xml.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/map_receiver.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/map_receiver.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/map_sender.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/map_sender.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/server.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/server.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/examples/perl/spout.pl
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/examples/perl/spout.pl
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/perl/
- copied from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/perl/
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/perl/Makefile.am
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/perl/Makefile.am
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/perl/perl.i
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/qpid/perl/perl.i
qpid/branches/qpid-2935/qpid/cpp/bindings/swig_perl_typemaps.i
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/bindings/swig_perl_typemaps.i
qpid/branches/qpid-2935/qpid/cpp/src/qpid/framing/ResizableBuffer.h
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/src/qpid/framing/ResizableBuffer.h
qpid/branches/qpid-2935/qpid/cpp/src/tests/brokertest.py
- copied unchanged from r1068442, qpid/trunk/qpid/cpp/src/tests/brokertest.py
qpid/branches/qpid-2935/qpid/doc/book/src/Security.xml
- copied unchanged from r1068442, qpid/trunk/qpid/doc/book/src/Security.xml
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryTest.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryTest.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/AutoCommitTransactionTest.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/AutoCommitTransactionTest.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/LocalTransactionTest.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/LocalTransactionTest.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/MockAction.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/MockAction.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/MockServerMessage.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/MockServerMessage.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/MockStoreTransaction.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/txn/MockStoreTransaction.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/ChannelToSessionMap.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/ChannelToSessionMap.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/thread/LoggingUncaughtExceptionHandler.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/thread/LoggingUncaughtExceptionHandler.java
qpid/branches/qpid-2935/qpid/java/common/src/test/java/org/apache/qpid/pool/ReferenceCountingExecutorServiceTest.java
- copied unchanged from r1068442, qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/pool/ReferenceCountingExecutorServiceTest.java
qpid/branches/qpid-2935/qpid/java/lib/maven-ant-tasks-2.1.1.jar
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/maven-ant-tasks-2.1.1.jar
qpid/branches/qpid-2935/qpid/java/lib/poms/backport-util-concurrent-2.2.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/backport-util-concurrent-2.2.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-beanutils-core-1.8.0.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-beanutils-core-1.8.0.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-cli-1.0.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-cli-1.0.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-codec-1.3.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-codec-1.3.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-collections-3.2.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-collections-3.2.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-configuration-1.6.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-configuration-1.6.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-digester-1.8.1.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-digester-1.8.1.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-lang-2.2.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-lang-2.2.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-logging-1.0.4.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-logging-1.0.4.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-pool-1.4.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/commons-pool-1.4.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/derby-10.6.1.0.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/derby-10.6.1.0.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/geronimo-jms_1.1_spec-1.0.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/geronimo-jms_1.1_spec-1.0.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/junit-3.8.1.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/junit-3.8.1.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/log4j-1.2.12.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/log4j-1.2.12.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/mina-core-1.0.1.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/mina-core-1.0.1.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/mina-filter-ssl-1.0.1.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/mina-filter-ssl-1.0.1.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/org.apache.felix.framework-2.0.5.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/org.apache.felix.framework-2.0.5.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/org.osgi.core-1.0.0.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/org.osgi.core-1.0.0.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/slf4j-api-1.6.1.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/slf4j-api-1.6.1.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/slf4j-log4j12-1.6.1.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/slf4j-log4j12-1.6.1.xml
qpid/branches/qpid-2935/qpid/java/lib/poms/xalan-2.7.0.xml
- copied unchanged from r1068442, qpid/trunk/qpid/java/lib/poms/xalan-2.7.0.xml
Removed:
qpid/branches/qpid-2935/qpid/java/lib/poms/backport-util-concurrent-2.2.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-beanutils-core-1.8.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-cli-1.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-codec-1.3.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-collections-3.2.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-configuration-1.6.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-digester-1.8.1.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-lang-2.2.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-logging-1.0.4.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/commons-pool-1.4.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/derby-10.3.2.1.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/geronimo-jms_1.1_spec-1.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/junit-3.8.1.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/log4j-1.2.12.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/mina-core-1.0.1.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/mina-filter-ssl-1.0.1.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/org.apache.felix.framework-1.0.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/org.osgi.core-1.0.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/slf4j-api-1.4.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/slf4j-log4j12-1.4.0.pom
qpid/branches/qpid-2935/qpid/java/lib/poms/xalan-2.7.0.pom
qpid/branches/qpid-2935/qpid/python/qpid/brokertest.py
Modified:
qpid/branches/qpid-2935/qpid/ (props changed)
qpid/branches/qpid-2935/qpid/bin/release.sh
qpid/branches/qpid-2935/qpid/cpp/Makefile.am
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/cpp/agent.cpp
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/python/qmf2.py
qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/ruby/qmf2.rb
qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/Makefile.am
qpid/branches/qpid-2935/qpid/cpp/bindings/swig_python_typemaps.i
qpid/branches/qpid-2935/qpid/cpp/configure.ac
qpid/branches/qpid-2935/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj (props changed)
qpid/branches/qpid-2935/qpid/cpp/include/qmf/AgentSession.h
qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleEvent.h
qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleSession.h
qpid/branches/qpid-2935/qpid/cpp/include/qmf/engine/Agent.h (props changed)
qpid/branches/qpid-2935/qpid/cpp/include/qmf/engine/Console.h (props changed)
qpid/branches/qpid-2935/qpid/cpp/include/qpid/client/ConnectionSettings.h
qpid/branches/qpid-2935/qpid/cpp/src/CMakeLists.txt (props changed)
qpid/branches/qpid-2935/qpid/cpp/src/Makefile.am
qpid/branches/qpid-2935/qpid/cpp/src/qmf/Agent.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentImpl.h
qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentSession.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEvent.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEventImpl.h
qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleSession.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleSessionImpl.h
qpid/branches/qpid-2935/qpid/cpp/src/qmf/SchemaId.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qmf/engine/Agent.cpp (props changed)
qpid/branches/qpid-2935/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/agent/ManagementAgentImpl.h
qpid/branches/qpid-2935/qpid/cpp/src/qpid/broker/Connection.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/client/ConnectionSettings.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/client/SslConnector.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.h
qpid/branches/qpid-2935/qpid/cpp/src/qpid/cluster/UpdateClient.cpp (contents, props changed)
qpid/branches/qpid-2935/qpid/cpp/src/qpid/cluster/UpdateClient.h (contents, props changed)
qpid/branches/qpid-2935/qpid/cpp/src/qpid/framing/Buffer.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/management/ManagementAgent.cpp (contents, props changed)
qpid/branches/qpid-2935/qpid/cpp/src/qpid/management/ManagementAgent.h (contents, props changed)
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/RdmaIOPlugin.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/Socket.h
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/SslPlugin.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/rdma/rdma_wrap.h
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp
qpid/branches/qpid-2935/qpid/cpp/src/qpid/sys/ssl/SslSocket.h
qpid/branches/qpid-2935/qpid/cpp/src/tests/cli_tests.py
qpid/branches/qpid-2935/qpid/cpp/src/tests/cluster.mk
qpid/branches/qpid-2935/qpid/cpp/src/tests/cluster_test_logs.py
qpid/branches/qpid-2935/qpid/cpp/src/tests/cluster_tests.py (contents, props changed)
qpid/branches/qpid-2935/qpid/cpp/src/tests/ssl_test
qpid/branches/qpid-2935/qpid/cpp/src/tests/store.py (contents, props changed)
qpid/branches/qpid-2935/qpid/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml
qpid/branches/qpid-2935/qpid/doc/book/src/Programming-In-Apache-Qpid.xml
qpid/branches/qpid-2935/qpid/doc/book/src/Starting-a-cluster.xml
qpid/branches/qpid-2935/qpid/dotnet/build-msbuild.bat (props changed)
qpid/branches/qpid-2935/qpid/dotnet/build-nant-release (props changed)
qpid/branches/qpid-2935/qpid/dotnet/build-nant.bat (props changed)
qpid/branches/qpid-2935/qpid/java/ (props changed)
qpid/branches/qpid-2935/qpid/java/broker/ (props changed)
qpid/branches/qpid-2935/qpid/java/broker/bin/ (props changed)
qpid/branches/qpid-2935/qpid/java/broker/etc/config.xml
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionTuneOkMethodHandler.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/management/ (props changed)
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ (props changed)
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/AutoCommitTransaction.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/LocalTransaction.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/txn/ServerTransaction.java
qpid/branches/qpid-2935/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ (props changed)
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockQueueEntry.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleQueueEntryListTest.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
qpid/branches/qpid-2935/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/MockSubscription.java
qpid/branches/qpid-2935/qpid/java/build.xml
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_8.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionTuneMethodHandler.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractAMQMessageDelegate.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolSession.java
qpid/branches/qpid-2935/qpid/java/client/src/main/java/org/apache/qpid/jms/ChannelLimitReachedException.java
qpid/branches/qpid-2935/qpid/java/common/Composite.tpl
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/thread/DefaultThreadFactory.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/thread/RealtimeThreadFactory.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolError.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolEvent.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolHeader.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java
qpid/branches/qpid-2935/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java
qpid/branches/qpid-2935/qpid/java/common/src/test/java/org/apache/qpid/thread/ThreadFactoryTest.java
qpid/branches/qpid-2935/qpid/java/genpom
qpid/branches/qpid-2935/qpid/java/management/client/src/main/java/org/apache/qpid/management/ (props changed)
qpid/branches/qpid-2935/qpid/java/management/client/src/test/java/org/apache/qpid/management/ (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ConfigurationManagement.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src/ (props changed)
qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java (props changed)
qpid/branches/qpid-2935/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Contents/MacOS/qpidmc (props changed)
qpid/branches/qpid-2935/qpid/java/module.xml
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java (props changed)
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/ (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/08StandaloneExcludes (contents, props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/CPPExcludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/Excludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/Java010Excludes
qpid/branches/qpid-2935/qpid/java/test-profiles/JavaExcludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/JavaStandaloneExcludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/JavaTransientExcludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/XAExcludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/clean-dir (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.async.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.cluster.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.noprefetch.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.ssl.excludes (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.ssl.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/default.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/java-derby.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/java.testprofile (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/log4j-test.xml (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/test-provider.properties (props changed)
qpid/branches/qpid-2935/qpid/java/test-profiles/test_resources/ (props changed)
qpid/branches/qpid-2935/qpid/packaging/windows/ (props changed)
qpid/branches/qpid-2935/qpid/python/ (props changed)
qpid/branches/qpid-2935/qpid/python/examples/api/spout (props changed)
qpid/branches/qpid-2935/qpid/python/qpid/concurrency.py (props changed)
qpid/branches/qpid-2935/qpid/ruby/ext/sasl/extconf.rb (props changed)
qpid/branches/qpid-2935/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py (props changed)
qpid/branches/qpid-2935/qpid/tools/src/py/qmf-tool
qpid/branches/qpid-2935/qpid/tools/src/py/qpid-config
qpid/branches/qpid-2935/qpid/tools/src/py/qpid-route
Propchange: qpid/branches/qpid-2935/qpid/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -2,3 +2,4 @@
/qpid/branches/0.6-release-windows-installer:926803
/qpid/branches/0.6-release-windows-installer/qpid:926803,927233
/qpid/branches/java-network-refactor/qpid:805429-825319
+/qpid/trunk/qpid:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/bin/release.sh
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/bin/release.sh?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/bin/release.sh (original)
+++ qpid/branches/qpid-2935/qpid/bin/release.sh Tue Feb 8 16:16:49 2011
@@ -208,7 +208,7 @@ fi
if [ "JAVA" == "$JAVA" ] ; then
pushd qpid-${VER}/java
- ant build release release-bin -Dsvnversion.output=${REV}
+ ant build release release-bin release-mvn -Dsvnversion.output=${REV}
popd
cp qpid-${VER}/java/release/*.tar.gz artifacts/qpid-java-${VER}.tar.gz
@@ -216,6 +216,10 @@ if [ "JAVA" == "$JAVA" ] ; then
cp qpid-${VER}/java/client/release/*.tar.gz artifacts/qpid-java-client-${VER}.tar.gz
#cp qpid-${VER}/java/client/example/release/*.tar.gz
cp qpid-${VER}/java/management/eclipse-plugin/release/*.tar.gz qpid-${VER}/java/management/eclipse-plugin/release/*.zip artifacts/
+
+ # copy the Maven artifacts
+ cp qpid-${VER}/java/client/release/maven artifacts/
+ cp qpid-${VER}/java/common/release/maven artifacts/
fi
if [ "DOTNET" == "$DOTNET" ] ; then
Modified: qpid/branches/qpid-2935/qpid/cpp/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/Makefile.am?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/Makefile.am (original)
+++ qpid/branches/qpid-2935/qpid/cpp/Makefile.am Tue Feb 8 16:16:49 2011
@@ -26,7 +26,7 @@ EXTRA_DIST = \
LICENSE NOTICE README.txt SSL RELEASE_NOTES DESIGN \
xml/cluster.xml INSTALL-WINDOWS CMakeLists.txt BuildInstallSettings.cmake \
packaging/NSIS QPID_VERSION.txt bindings/swig_python_typemaps.i \
- bindings/swig_ruby_typemaps.i
+ bindings/swig_ruby_typemaps.i bindings/swig_perl_typemaps.i
SUBDIRS = managementgen etc src docs/api docs/man examples bindings/qmf bindings/qpid bindings/qmf2
Modified: qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/cpp/agent.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/cpp/agent.cpp?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/cpp/agent.cpp (original)
+++ qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/examples/cpp/agent.cpp Tue Feb 8 16:16:49 2011
@@ -49,6 +49,7 @@ private:
Schema sch_exception;
Schema sch_control;
Schema sch_child;
+ Schema sch_event;
Data control;
DataAddr controlAddr;
@@ -115,6 +116,11 @@ void ExampleAgent::setupSchema()
echoMethod.addArgument(SchemaProperty("map", SCHEMA_DATA_MAP, "{dir:INOUT}"));
sch_control.addMethod(echoMethod);
+ SchemaMethod eventMethod("event", "{desc:'Raise an Event'}");
+ eventMethod.addArgument(SchemaProperty("text", SCHEMA_DATA_STRING, "{dir:IN}"));
+ eventMethod.addArgument(SchemaProperty("severity", SCHEMA_DATA_INT, "{dir:IN}"));
+ sch_control.addMethod(eventMethod);
+
SchemaMethod failMethod("fail", "{desc:'Expected to Fail'}");
failMethod.addArgument(SchemaProperty("useString", SCHEMA_DATA_BOOL, "{dir:IN}"));
failMethod.addArgument(SchemaProperty("stringVal", SCHEMA_DATA_STRING, "{dir:IN}"));
@@ -133,11 +139,18 @@ void ExampleAgent::setupSchema()
sch_child.addProperty(SchemaProperty("name", SCHEMA_DATA_STRING));
//
+ // Declare the event class
+ //
+ sch_event = Schema(SCHEMA_TYPE_EVENT, package, "event");
+ sch_event.addProperty(SchemaProperty("text", SCHEMA_DATA_STRING));
+
+ //
// Register our schemata with the agent session.
//
session.registerSchema(sch_exception);
session.registerSchema(sch_control);
session.registerSchema(sch_child);
+ session.registerSchema(sch_event);
}
void ExampleAgent::populateData()
@@ -173,40 +186,55 @@ bool ExampleAgent::method(AgentEvent& ev
const string& name(event.getMethodName());
control.setProperty("methodCount", control.getProperty("methodCount").asUint32() + 1);
- if (controlAddr == event.getDataAddr()) {
- if (name == "stop") {
- cout << "Stopping: message=" << event.getArguments()["message"] << endl;
- session.methodSuccess(event);
- return false;
- }
+ try {
+ if (controlAddr == event.getDataAddr()) {
+ if (name == "stop") {
+ cout << "Stopping: message=" << event.getArguments()["message"] << endl;
+ session.methodSuccess(event);
+ return false;
+ }
- if (name == "echo") {
- event.addReturnArgument("sequence", event.getArguments()["sequence"]);
- event.addReturnArgument("map", event.getArguments()["map"]);
- session.methodSuccess(event);
- return true;
- }
+ if (name == "echo") {
+ event.addReturnArgument("sequence", event.getArguments()["sequence"]);
+ event.addReturnArgument("map", event.getArguments()["map"]);
+ session.methodSuccess(event);
+ return true;
+ }
- if (name == "fail") {
- if (event.getArguments()["useString"])
- session.raiseException(event, event.getArguments()["stringVal"]);
- else {
- Data ex(sch_exception);
- ex.setProperty("whatHappened", "It Failed");
- ex.setProperty("howBad", 75);
- ex.setProperty("details", event.getArguments()["details"]);
- session.raiseException(event, ex);
+ if (name == "event") {
+ Data ev(sch_event);
+ ev.setProperty("text", event.getArguments()["text"]);
+ session.raiseEvent(ev, event.getArguments()["severity"]);
+ session.methodSuccess(event);
+ return true;
}
- }
- if (name == "create_child") {
- const string& name(event.getArguments()["name"]);
- Data child(sch_child);
- child.setProperty("name", name);
- DataAddr addr(session.addData(child, name));
- event.addReturnArgument("childAddr", addr.asMap());
- session.methodSuccess(event);
+ if (name == "fail") {
+ if (event.getArguments()["useString"])
+ session.raiseException(event, event.getArguments()["stringVal"]);
+ else {
+ Data ex(sch_exception);
+ ex.setProperty("whatHappened", "It Failed");
+ ex.setProperty("howBad", 75);
+ ex.setProperty("details", event.getArguments()["details"]);
+ session.raiseException(event, ex);
+ }
+ }
+
+ if (name == "create_child") {
+ const string& name(event.getArguments()["name"]);
+ Data child(sch_child);
+ child.setProperty("name", name);
+ DataAddr addr(session.addData(child, name));
+ event.addReturnArgument("childAddr", addr.asMap());
+ session.methodSuccess(event);
+ }
}
+ } catch (const exception& e) {
+ //
+ // Pass the exception on to the caller.
+ //
+ session.raiseException(event, e.what());
}
return true;
Modified: qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/python/qmf2.py
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/python/qmf2.py?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/python/qmf2.py (original)
+++ qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/python/qmf2.py Tue Feb 8 16:16:49 2011
@@ -137,6 +137,90 @@ class AgentHandler(Thread):
pass
+#===================================================================================================
+# CONSOLE HANDLER
+#===================================================================================================
+class ConsoleHandler(Thread):
+
+ def __init__(self, consoleSession):
+ Thread.__init__(self)
+ self.__session = consoleSession
+ self.__running = True
+
+ def cancel(self):
+ """
+ Stop the handler thread.
+ """
+ self.__running = None
+
+ def run(self):
+ event = cqmf2.ConsoleEvent()
+ while self.__running:
+ valid = self.__session._impl.nextEvent(event, cqpid.Duration.SECOND)
+ if valid and self.__running:
+ if event.getType() == cqmf2.CONSOLE_AGENT_ADD:
+ self.agentAdded(Agent(event.getAgent()))
+
+ elif event.getType() == cqmf2.CONSOLE_AGENT_DEL:
+ reason = 'filter'
+ if event.getAgentDelReason() == cqmf2.AGENT_DEL_AGED:
+ reason = 'aged'
+ self.agentDeleted(Agent(event.getAgent(), reason))
+
+ elif event.getType() == cqmf2.CONSOLE_AGENT_RESTART:
+ self.agentRestarted(Agent(event.getAgent()))
+
+ elif event.getType() == cqmf2.CONSOLE_AGENT_SCHEMA_UPDATE:
+ self.agentSchemaUpdated(Agent(event.getAgent()))
+
+ elif event.getType() == cqmf2.CONSOLE_EVENT:
+ self.eventRaised(Agent(event.getAgent()), Data(event.getData(0)), event.getTimestamp(), event.getSeverity())
+
+ ##
+ ## The following methods are intended to be overridden in a sub-class. They are
+ ## handlers for events that occur on QMF consoles.
+ ##
+
+ #
+ # A new agent, whose attributes match the console's agent filter, has been discovered.
+ #
+ def agentAdded(self, agent):
+ pass
+
+ #
+ # A known agent has been removed from the agent list. There are two possible reasons
+ # for agent deletion:
+ #
+ # 1) 'aged' - The agent hasn't been heard from for the maximum age interval and is
+ # presumed dead.
+ # 2) 'filter' - The agent no longer matches the console's agent-filter and has been
+ # effectively removed from the agent list. Such occurrences are likely
+ # to be seen immediately after setting the filter to a new value.
+ #
+ def agentDeleted(self, agent, reason):
+ pass
+
+ #
+ # An agent-restart was detected. This occurs when the epoch number advertised by the
+ # agent changes. It indicates that the agent in question was shut-down/crashed and
+ # restarted.
+ #
+ def agentRestarted(self, agent):
+ pass
+
+ #
+ # The agent has registered new schema information which can now be queried, if desired.
+ #
+ def agentSchemaUpdated(self, agent):
+ pass
+
+ #
+ # An agent raised an event. The 'data' argument is a Data object that contains the
+ # content of the event.
+ #
+ def eventRaised(self, agent, data, timestamp, severity):
+ pass
+
#===================================================================================================
# CONSOLE SESSION
@@ -147,6 +231,16 @@ class ConsoleSession(object):
def __init__(self, connection, options=""):
"""
+ ## The options string is of the form "{key:value,key:value}". The following keys are supported:
+ ##
+ ## domain:NAME - QMF Domain to join [default: "default"]
+ ## max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from
+ ## an agent before deleting it [default: 5]
+ ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default]
+ ## If False: Listen only on the routable direct address
+ ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network
+ ## - If False: Operate more flexibly with regard to use of messaging facilities [default]
+ ##
"""
self._impl = cqmf2.ConsoleSession(connection, options)
@@ -195,6 +289,24 @@ class AgentSession(object):
def __init__(self, connection, options=""):
"""
+ ## The options string is of the form "{key:value,key:value}". The following keys are supported:
+ ##
+ ## interval:N - Heartbeat interval in seconds [default: 60]
+ ## external:{True,False} - Use external data storage (queries and subscriptions are pass-through) [default: False]
+ ## allow-queries:{True,False} - If True: automatically allow all queries [default]
+ ## If False: generate an AUTH_QUERY event to allow per-query authorization
+ ## allow-methods:{True,False} - If True: automatically allow all methods [default]
+ ## If False: generate an AUTH_METHOD event to allow per-method authorization
+ ## max-subscriptions:N - Maximum number of concurrent subscription queries permitted [default: 64]
+ ## min-sub-interval:N - Minimum publish interval (in milliseconds) permitted for a subscription [default: 3000]
+ ## sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300]
+ ## public-events:{True,False} - If True: QMF events are sent to the topic exchange [default]
+ ## If False: QMF events are only sent to authorized subscribers
+ ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default]
+ ## If False: Listen only on the routable direct address
+ ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network
+ ## - If False: Operate more flexibly with regard to use of messaging facilities [default]
+ ##
"""
self._impl = cqmf2.AgentSession(connection, options)
@@ -261,8 +373,6 @@ class AgentSession(object):
else:
self._impl.raiseException(handle, data)
- ## TODO: async and external operations
-
#===================================================================================================
# AGENT PROXY
@@ -372,6 +482,29 @@ class Query(object):
if arg1.__class__ == DataAddr:
self._impl = cqmf2.Query(arg1._impl)
+ def getAddr(self):
+ """
+ """
+ return DataAddr(self._impl.getDataAddr())
+
+ def getSchemaId(self):
+ """
+ """
+ return SchemaId(self._impl.getSchemaId())
+
+ def getPredicate(self):
+ """
+ """
+ return self._impl.getPredicate()
+
+ def matches(self, data):
+ """
+ """
+ m = data
+ if data.__class__ == Data:
+ m = data.getProperties()
+ return self._impl.matchesPredicate(m)
+
#===================================================================================================
# DATA
#===================================================================================================
@@ -411,6 +544,17 @@ class Data(object):
"""
return Agent(self._impl.getAgent())
+ def update(self, timeout=5):
+ dur = cqpid.Duration(cqpid.Duration.SECOND.getMilliseconds() * timeout)
+ agent = self._impl.getAgent()
+ query = cqmf2.Query(self._impl.getAddr())
+ result = agent.query(query, dur)
+ if result.getType() != cqmf2.CONSOLE_QUERY_RESPONSE:
+ raise "Update query failed"
+ if result.getDataCount == 0:
+ raise "Object no longer exists on agent"
+ self._impl = cqmf2.Data(result.getData(0))
+
def getProperties(self):
"""
"""
@@ -519,11 +663,13 @@ class DataAddr(object):
"""
"""
- def __init__(self, arg):
+ def __init__(self, arg, agentName=""):
if arg.__class__ == dict:
self._impl = cqmf2.DataAddr(arg)
- else:
+ elif arg.__class__ == cqmf2.DataAddr:
self._impl = arg
+ else:
+ self._impl = cqmf2.DataAddr(arg, agentName)
def __repr__(self):
return "%s:%s" % (self.getAgentName(), self.getName())
Modified: qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/ruby/qmf2.rb
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/ruby/qmf2.rb?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/ruby/qmf2.rb (original)
+++ qpid/branches/qpid-2935/qpid/cpp/bindings/qmf2/ruby/qmf2.rb Tue Feb 8 16:16:49 2011
@@ -78,12 +78,273 @@ module Qmf2
end
##==============================================================================
- ## AGENT HANDLER TODO
+ ## AGENT HANDLER
##==============================================================================
class AgentHandler
- def get_query(context, query, userId); end
- def method_call(context, name, object_id, args, userId); end
+
+ def initialize(session)
+ @_session = session
+ @_running = false
+ @_thread = nil
+ end
+
+ ##
+ ## Call the "start" method to run the handler on a new thread.
+ ##
+ def start
+ @_thread = Thread.new do
+ run
+ end
+ end
+
+ ##
+ ## Request that the running thread complete and exit.
+ ##
+ def cancel
+ @_running = false
+ @_thread.join if @_thread
+ @_thread = nil
+ end
+
+ ##
+ ## Call the "run" method only if you want the handler to run on your own thread.
+ ##
+ def run
+ @_running = true
+ event = Cqmf2::AgentEvent.new
+ while @_running do
+ valid = @_session.impl.nextEvent(event, Cqpid::Duration.SECOND)
+ if valid and @_running
+ case event.getType
+ when Cqmf2::AGENT_AUTH_QUERY
+ yes = authorize_query(Query.new(event.getQuery()), event.getUserId())
+ if yes == true
+ @_session.impl.authAccept(event)
+ else
+ @_session.impl.authReject(event)
+ end
+
+ when Cqmf2::AGENT_QUERY
+ context = QueryContext.new(@_session, event)
+ get_query(context, Query.new(event.getQuery()), event.getUserId())
+
+ when Cqmf2::AGENT_METHOD
+ context = MethodContext.new(@_session, event)
+ begin
+ method_call(context, event.getMethodName(), event.getDataAddr(), event.getArguments(), event.getUserId())
+ rescue Exception => ex
+ @_session.impl.raiseException(event, "#{ex}")
+ end
+
+ end
+ end
+ end
+ end
+
+
+ ##
+ ## The following methods are intended to be overridden in a sub-class. They are
+ ## handlers for events that occur on QMF consoles.
+ ##
+
+ #
+ # This method will only be invoked if the "allow-queries" option is enabled on the
+ # agent session. When invoked, it provides the query and the authenticated user-id
+ # of the querying client.
+ #
+ # This method must return true if the query is permitted, false otherwise.
+ #
+ def authorize_query(query, user_id); end
+
+ #
+ # This method will only be invoked if the "external" option is "True" on the agent
+ # session. When invoked, the method should begin the process of responding to a data
+ # query. The authenticated user-id of the requestor is provided for informational
+ # purposes. The 'context' variable is used to provide the results back to the requestor.
+ #
+ # For each matching Data object, call context.response(data). When the query is complete,
+ # call context.complete(). After completing the query, you should not use 'context' any
+ # longer.
+ #
+ # Note: It is not necessary to process the query synchronously. If desired, this method
+ # may store the context for asynchronous processing or pass it to another thread for
+ # processing. There is no restriction on the number of contexts that may be in-flight
+ # concurrently.
+ #
+ def get_query(context, query, user_id); end
+
+ #
+ # This method is invoked when a console calls a QMF method on the agent. Supplied are
+ # a context for the response, the method name, the data address of the data object being
+ # called, the input arguments (a dictionary), and the caller's authenticated user-id.
+ #
+ # A method call can end one of two ways: Successful completion, in which the output
+ # arguments (if any) are supplied; and Exceptional completion if there is an error.
+ #
+ # Successful Completion:
+ # For each output argument, assign the value directly to context (context.arg1 = "value")
+ # Once arguments are assigned, call context._success().
+ #
+ # Exceptional Completion:
+ # Method 1: Call context._exception(data) where 'data' is a string or a Data object.
+ # Method 2: Raise an exception (raise "Error Text") synchronously in the method body.
+ #
+ # Note: Like get_query, method_call may process methods synchronously or asynchronously.
+ # This method may store the context for later asynchronous processing. There is no
+ # restriction on the number of contexts that may be in-flight concurrently.
+ #
+ # However, "Method 2" for Exceptional Completion can only be done synchronously.
+ #
+ def method_call(context, method_name, data_addr, args, user_id); end
+ end
+
+ class QueryContext
+ def initialize(agent, context)
+ @agent = agent
+ @context = context
+ end
+
+ def response(data)
+ @agent.impl.response(@context, data.impl)
+ end
+
+ def complete
+ @agent.impl.complete(@context)
+ end
+ end
+
+ class MethodContext
+ def initialize(agent, context)
+ @agent = agent
+ @context = context
+ end
+
+ def _success
+ @agent.impl.methodSuccess(@context)
+ end
+
+ def _exception(ex)
+ if ex.class == Data
+ @agent.impl.raiseException(@context, ex.impl)
+ else
+ @agent.impl.raiseException(@context, ex)
+ end
+ end
+
+ def method_missing(name_in, *args)
+ name = name_in.to_s
+ if name[name.length - 1] == 61
+ name = name[0..name.length - 2]
+ @context.impl.addReturnArgument(name, args[0])
+ else
+ super.method_missing(name_in, args)
+ end
+ end
+ end
+
+ ##==============================================================================
+ ## CONSOLE HANDLER
+ ##==============================================================================
+
+ class ConsoleHandler
+
+ def initialize(session)
+ @_session = session
+ @_running = false
+ @_thread = nil
+ end
+
+ ##
+ ## Call the "start" method to run the handler on a new thread.
+ ##
+ def start
+ @_thread = Thread.new do
+ run
+ end
+ end
+
+ ##
+ ## Request that the running thread complete and exit.
+ ##
+ def cancel
+ @_running = false
+ @_thread.join if @_thread
+ @_thread = nil
+ end
+
+ ##
+ ## Call the "run" method only if you want the handler to run on your own thread.
+ ##
+ def run
+ @_running = true
+ event = Cqmf2::ConsoleEvent.new
+ while @_running do
+ valid = @_session.impl.nextEvent(event, Cqpid::Duration.SECOND)
+ if valid and @_running
+ case event.getType
+ when Cqmf2::CONSOLE_AGENT_ADD
+ agent_added(Agent.new(event.getAgent))
+
+ when Cqmf2::CONSOLE_AGENT_DEL
+ reason = :filter
+ reason = :aged if event.getAgentDelReason == Cqmf2::AGENT_DEL_AGED
+ agent_deleted(Agent.new(event.getAgent), reason)
+
+ when Cqmf2::CONSOLE_AGENT_RESTART
+ agent_restarted(Agent.new(event.getAgent))
+
+ when Cqmf2::CONSOLE_AGENT_SCHEMA_UPDATE
+ agent_schema_updated(Agent.new(event.getAgent))
+
+ when Cqmf2::CONSOLE_EVENT
+ event_raised(Agent.new(event.getAgent), Data.new(event.getData(0)), event.getTimestamp, event.getSeverity)
+
+ end
+ end
+ end
+ end
+
+
+ ##
+ ## The following methods are intended to be overridden in a sub-class. They are
+ ## handlers for events that occur on QMF consoles.
+ ##
+
+ #
+ # A new agent, whose attributes match the console's agent filter, has been discovered.
+ #
+ def agent_added(agent); end
+
+ #
+ # A known agent has been removed from the agent list. There are two possible reasons
+ # for agent deletion:
+ #
+ # 1) :aged - The agent hasn't been heard from for the maximum age interval and is
+ # presumed dead.
+ # 2) :filter - The agent no longer matches the console's agent-filter and has been
+ # effectively removed from the agent list. Such occurrences are likely
+ # to be seen immediately after setting the filter to a new value.
+ #
+ def agent_deleted(agent, reason); end
+
+ #
+ # An agent-restart was detected. This occurs when the epoch number advertised by the
+ # agent changes. It indicates that the agent in question was shut-down/crashed and
+ # restarted.
+ #
+ def agent_restarted(agent); end
+
+ #
+ # The agent has registered new schema information which can now be queried, if desired.
+ #
+ def agent_schema_updated(agent); end
+
+ #
+ # An agent raised an event. The 'data' argument is a Data object that contains the
+ # content of the event.
+ #
+ def event_raised(agent, data, timestamp, severity); end
end
##==============================================================================
@@ -93,6 +354,16 @@ module Qmf2
class ConsoleSession
attr_reader :impl
+ ## The options string is of the form "{key:value,key:value}". The following keys are supported:
+ ##
+ ## domain:NAME - QMF Domain to join [default: "default"]
+ ## max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from
+ ## an agent before deleting it [default: 5]
+ ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default]
+ ## If False: Listen only on the routable direct address
+ ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network
+ ## - If False: Operate more flexibly with regard to use of messaging facilities [default]
+ ##
def initialize(connection, options="")
@impl = Cqmf2::ConsoleSession.new(connection, options)
end
@@ -124,6 +395,24 @@ module Qmf2
class AgentSession
attr_reader :impl
+ ## The options string is of the form "{key:value,key:value}". The following keys are supported:
+ ##
+ ## interval:N - Heartbeat interval in seconds [default: 60]
+ ## external:{True,False} - Use external data storage (queries and subscriptions are pass-through) [default: False]
+ ## allow-queries:{True,False} - If True: automatically allow all queries [default]
+ ## If False: generate an AUTH_QUERY event to allow per-query authorization
+ ## allow-methods:{True,False} - If True: automatically allow all methods [default]
+ ## If False: generate an AUTH_METHOD event to allow per-method authorization
+ ## max-subscriptions:N - Maximum number of concurrent subscription queries permitted [default: 64]
+ ## min-sub-interval:N - Minimum publish interval (in milliseconds) permitted for a subscription [default: 3000]
+ ## sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300]
+ ## public-events:{True,False} - If True: QMF events are sent to the topic exchange [default]
+ ## If False: QMF events are only sent to authorized subscribers
+ ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default]
+ ## If False: Listen only on the routable direct address
+ ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network
+ ## - If False: Operate more flexibly with regard to use of messaging facilities [default]
+ ##
def initialize(connection, options="")
@impl = Cqmf2::AgentSession.new(connection, options)
end
@@ -137,25 +426,13 @@ module Qmf2
def close() @impl.close end
def register_schema(cls) @impl.registerSchema(cls.impl) end
- def add_data(data, name="", persistent=:false)
+ def add_data(data, name="", persistent=false)
DataAddr.new(@impl.addData(data.impl, name, persistent))
end
def del_data(addr)
@impl.del_data(addr.impl)
end
-
- def method_success(handle)
- @impl.methodSuccess(handle)
- end
-
- def raise_exception(handle, data)
- if data.class == Data
- @impl.raiseException(handle, data.impl)
- else
- @impl.raiseException(handle, data)
- end
- end
end
##==============================================================================
@@ -228,7 +505,7 @@ module Qmf2
end
##==============================================================================
- ## QUERY TODO
+ ## QUERY
##==============================================================================
class Query
@@ -238,6 +515,16 @@ module Qmf2
@impl = Cqmf2::Query.new(arg1.impl)
end
end
+
+ def addr() DataAddr.new(@impl.getDataAddr()) end
+ def schema_id() SchemaId.new(@impl.getSchemaId()) end
+ def predicate() @impl.getPredicate() end
+
+ def matches?(data)
+ map = data
+ map = data.properties if data.class == Data
+ @impl.matchesPredicate(map)
+ end
end
##==============================================================================
@@ -248,16 +535,17 @@ module Qmf2
attr_reader :impl
def initialize(arg=nil)
+ @schema = nil
if arg == nil
@impl = Cqmf2::Data.new
elsif arg.class == Cqmf2::Data
@impl = arg
elsif arg.class == Schema
- @impl = Cqmf2::Data(arg.impl)
+ @impl = Cqmf2::Data.new(arg.impl)
+ @schema = arg
else
raise "Unsupported initializer for Data"
end
- @schema = nil
end
def to_s
@@ -271,6 +559,10 @@ module Qmf2
return nil
end
+ def set_addr(addr)
+ @impl.setAddr(addr.impl)
+ end
+
def addr
if @impl.hasAddr
return DataAddr.new(@impl.getAddr)
@@ -282,6 +574,17 @@ module Qmf2
return Agent.new(@impl.getAgent)
end
+ def update(timeout=5)
+ dur = Cqpid::Duration.new(Cqpid::Duration.SECOND.getMilliseconds * timeout)
+ agent = @impl.getAgent
+ query = Cqmf2::Query.new(@impl.getAddr)
+ result = agent.query(query, dur)
+ raise "Update query failed" if result.getType != Cqmf2::CONSOLE_QUERY_RESPONSE
+ raise "Object no longer exists on agent" if result.getDataCount == 0
+ @impl = Cqmf2::Data.new(result.getData(0))
+ return nil
+ end
+
def properties
return @impl.getProperties
end
@@ -392,11 +695,13 @@ module Qmf2
class DataAddr
attr_reader :impl
- def initialize(arg)
+ def initialize(arg, agentName="")
if arg.class == Hash
@impl = Cqmf2::DataAddr.new(arg)
- else
+ elsif arg.class == Cqmf2::DataAddr
@impl = arg
+ else
+ @impl = Cqmf2::DataAddr.new(arg, agentName)
end
end
Modified: qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/Makefile.am?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/Makefile.am (original)
+++ qpid/branches/qpid-2935/qpid/cpp/bindings/qpid/Makefile.am Tue Feb 8 16:16:49 2011
@@ -30,4 +30,8 @@ if HAVE_PYTHON_DEVEL
SUBDIRS += python
endif
+if HAVE_PERL_DEVEL
+SUBDIRS += perl
+endif
+
endif
Modified: qpid/branches/qpid-2935/qpid/cpp/bindings/swig_python_typemaps.i
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/bindings/swig_python_typemaps.i?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/bindings/swig_python_typemaps.i (original)
+++ qpid/branches/qpid-2935/qpid/cpp/bindings/swig_python_typemaps.i Tue Feb 8 16:16:49 2011
@@ -32,11 +32,11 @@ typedef int Py_ssize_t;
void PyToList(PyObject*, qpid::types::Variant::List*);
qpid::types::Variant PyToVariant(PyObject* value) {
+ if (PyBool_Check(value)) return qpid::types::Variant(bool(PyInt_AS_LONG(value) ? true : false));
if (PyFloat_Check(value)) return qpid::types::Variant(PyFloat_AS_DOUBLE(value));
- if (PyString_Check(value)) return qpid::types::Variant(std::string(PyString_AS_STRING(value)));
if (PyInt_Check(value)) return qpid::types::Variant(int64_t(PyInt_AS_LONG(value)));
if (PyLong_Check(value)) return qpid::types::Variant(int64_t(PyLong_AsLongLong(value)));
- if (PyBool_Check(value)) return qpid::types::Variant(bool(PyInt_AS_LONG(value) ? true : false));
+ if (PyString_Check(value)) return qpid::types::Variant(std::string(PyString_AS_STRING(value)));
if (PyDict_Check(value)) {
qpid::types::Variant::Map map;
PyToMap(value, &map);
Modified: qpid/branches/qpid-2935/qpid/cpp/configure.ac
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/configure.ac?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/configure.ac (original)
+++ qpid/branches/qpid-2935/qpid/cpp/configure.ac Tue Feb 8 16:16:49 2011
@@ -198,7 +198,7 @@ if test -n "$RUBY" ; then
fi
AM_CONDITIONAL([HAVE_RUBY_DEVEL], [test -f $RUBY_INC/ruby.h && test -n "$SWIG"])
-# Python bindings: To build python wrappers, the ruby-devel files must be present.
+# Python bindings: To build python wrappers, the python-devel files must be present.
AM_PATH_PYTHON()
if test -n "$PYTHON" ; then
@@ -228,6 +228,17 @@ if test -n "$PYTHON" ; then
fi
AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test -f $PYTHON_INC/Python.h && test -n "$SWIG"])
+
+# Perl bindings:
+
+AC_CHECK_PROG([PERL], [perl], [perl])
+if test -n "$PERL"; then
+ PERL_ARCHLIB=`perl -MConfig -e 'print "$Config{archlib}";'`
+ AC_CHECK_FILE( ["$PERL_ARCHLIB/CORE/perl.h"],
+ [AC_SUBST([PERL_INC], ["$PERL_ARCHLIB/CORE"])] )
+fi
+AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$PERL" && test -n "$SWIG" && test -n "$PERL_INC"])
+
specdir=`pwd`/$srcdir/../specs
AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.xml
AC_SUBST(AMQP_FINAL_XML)
@@ -526,6 +537,7 @@ AC_CONFIG_FILES([
bindings/qpid/Makefile
bindings/qpid/ruby/Makefile
bindings/qpid/python/Makefile
+ bindings/qpid/perl/Makefile
bindings/qmf/Makefile
bindings/qmf/ruby/Makefile
bindings/qmf/python/Makefile
Propchange: qpid/branches/qpid-2935/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -2,3 +2,4 @@
/qpid/branches/0.6-release-windows-installer/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:926803
/qpid/branches/0.6-release-windows-installer/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:926803,927218,927233
/qpid/branches/java-network-refactor/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:805429-825319
+/qpid/trunk/qpid/cpp/examples/tradedemo/tradedemo_topic_publisher.vcproj:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/cpp/include/qmf/AgentSession.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/include/qmf/AgentSession.h?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/include/qmf/AgentSession.h (original)
+++ qpid/branches/qpid-2935/qpid/cpp/include/qmf/AgentSession.h Tue Feb 8 16:16:49 2011
@@ -67,6 +67,10 @@ namespace qmf {
* sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300]
* public-events:{True,False} - If True: QMF events are sent to the topic exchange [default]
* If False: QMF events are only sent to authorized subscribers
+ * listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default]
+ * If False: Listen only on the routable direct address
+ * strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network
+ * - If False: Operate more flexibly with regard to use of messaging facilities [default]
*/
QMF_EXTERN AgentSession(qpid::messaging::Connection&, const std::string& options="");
@@ -161,8 +165,14 @@ namespace qmf {
/**
* Raise an event to be sent into the QMF network.
+ *
+ * @param data - A data object that contains the event contents.
+ * @param severity - Explicit severity (from qmf/SchemaTypes.h). If omitted, the severity is set to
+ * the default severity for the data's schema. If the data has no schema, the severity defaults
+ * to SEV_NOTICE.
*/
- QMF_EXTERN void raiseEvent(const Data&);
+ QMF_EXTERN void raiseEvent(const Data& data);
+ QMF_EXTERN void raiseEvent(const Data& data, int severity);
#ifndef SWIG
private:
Modified: qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleEvent.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleEvent.h?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleEvent.h (original)
+++ qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleEvent.h Tue Feb 8 16:16:49 2011
@@ -74,6 +74,8 @@ namespace qmf {
QMF_EXTERN Data getData(uint32_t) const;
QMF_EXTERN bool isFinal() const;
QMF_EXTERN const qpid::types::Variant::Map& getArguments() const;
+ QMF_EXTERN int getSeverity() const;
+ QMF_EXTERN uint64_t getTimestamp() const;
#ifndef SWIG
private:
Modified: qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleSession.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleSession.h?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleSession.h (original)
+++ qpid/branches/qpid-2935/qpid/cpp/include/qmf/ConsoleSession.h Tue Feb 8 16:16:49 2011
@@ -57,6 +57,10 @@ namespace qmf {
* domain:NAME - QMF Domain to join [default: "default"]
* max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from
* an agent before deleting it [default: 5]
+ * listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default]
+ * If False: Listen only on the routable direct address
+ * strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network
+ * - If False: Operate more flexibly with regard to use of messaging facilities [default]
*/
QMF_EXTERN ConsoleSession(qpid::messaging::Connection&, const std::string& options="");
QMF_EXTERN void setDomain(const std::string&);
Propchange: qpid/branches/qpid-2935/qpid/cpp/include/qmf/engine/Agent.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -0,0 +1 @@
+/qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/cpp/include/qmf/engine/Console.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -0,0 +1 @@
+/qpid/trunk/qpid/cpp/include/qmf/engine/Console.h:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/cpp/include/qpid/client/ConnectionSettings.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/include/qpid/client/ConnectionSettings.h?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/include/qpid/client/ConnectionSettings.h (original)
+++ qpid/branches/qpid-2935/qpid/cpp/include/qpid/client/ConnectionSettings.h Tue Feb 8 16:16:49 2011
@@ -122,6 +122,11 @@ struct ConnectionSettings {
* layer. 0 means no security layer allowed.
*/
unsigned int maxSsf;
+ /**
+ * SSL cert-name for the connection. Overrides global SSL
+ * settings. Used only when a client connects to the broker.
+ */
+ std::string sslCertName;
};
}} // namespace qpid::client
Propchange: qpid/branches/qpid-2935/qpid/cpp/src/CMakeLists.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -2,3 +2,4 @@
/qpid/branches/0.6-release-windows-installer/cpp/src/CMakeLists.txt:926803
/qpid/branches/0.6-release-windows-installer/qpid/cpp/src/CMakeLists.txt:926803,927233,932132
/qpid/branches/java-network-refactor/qpid/cpp/src/CMakeLists.txt:805429-825319
+/qpid/trunk/qpid/cpp/src/CMakeLists.txt:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/src/Makefile.am?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/src/Makefile.am (original)
+++ qpid/branches/qpid-2935/qpid/cpp/src/Makefile.am Tue Feb 8 16:16:49 2011
@@ -373,6 +373,7 @@ libqpidcommon_la_SOURCES += \
qpid/framing/BodyHandler.cpp \
qpid/framing/BodyHandler.h \
qpid/framing/Buffer.cpp \
+ qpid/framing/ResizableBuffer.h \
qpid/framing/ChannelHandler.h \
qpid/framing/Endian.cpp \
qpid/framing/Endian.h \
Modified: qpid/branches/qpid-2935/qpid/cpp/src/qmf/Agent.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/src/qmf/Agent.cpp?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/src/qmf/Agent.cpp (original)
+++ qpid/branches/qpid-2935/qpid/cpp/src/qmf/Agent.cpp Tue Feb 8 16:16:49 2011
@@ -71,8 +71,8 @@ Schema Agent::getSchema(const SchemaId&
AgentImpl::AgentImpl(const std::string& n, uint32_t e, ConsoleSessionImpl& s) :
- name(n), epoch(e), session(s), touched(true), untouchedCount(0), capability(0),
- nextCorrelator(1), schemaCache(s.schemaCache)
+ name(n), directSubject(n), epoch(e), session(s), touched(true), untouchedCount(0), capability(0),
+ sender(session.directSender), nextCorrelator(1), schemaCache(s.schemaCache)
{
}
@@ -83,6 +83,11 @@ void AgentImpl::setAttribute(const std::
try {
capability = v.asUint32();
} catch (std::exception&) {}
+ if (k == "_direct_subject")
+ try {
+ directSubject = v.asString();
+ sender = session.topicSender;
+ } catch (std::exception&) {}
}
const Variant& AgentImpl::getAttribute(const string& k) const
@@ -114,7 +119,9 @@ ConsoleEvent AgentImpl::query(const Quer
context->cond.wait(context->lock,
qpid::sys::AbsTime(qpid::sys::now(),
qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC)));
- if (context->response.isValid() && context->response.isFinal())
+ if (context->response.isValid() &&
+ ((context->response.getType() == CONSOLE_QUERY_RESPONSE && context->response.isFinal()) ||
+ (context->response.getType() == CONSOLE_EXCEPTION)))
result = context->response;
else {
auto_ptr<ConsoleEventImpl> impl(new ConsoleEventImpl(CONSOLE_EXCEPTION));
@@ -370,9 +377,43 @@ void AgentImpl::handleMethodResponse(con
}
-void AgentImpl::handleDataIndication(const Variant::List&, const Message&)
+void AgentImpl::handleDataIndication(const Variant::List& list, const Message& msg)
{
- // TODO
+ Variant::Map::const_iterator aIter;
+ const Variant::Map& props(msg.getProperties());
+ boost::shared_ptr<SyncContext> context;
+
+ aIter = props.find("qmf.content");
+ if (aIter == props.end())
+ return;
+
+ string content_type(aIter->second.asString());
+ if (content_type != "_event")
+ return;
+
+ for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) {
+ const Variant::Map& eventMap(lIter->asMap());
+ Data data(new DataImpl(eventMap, this));
+ int severity(SEV_NOTICE);
+ uint64_t timestamp(0);
+
+ aIter = eventMap.find("_severity");
+ if (aIter != eventMap.end())
+ severity = int(aIter->second.asInt8());
+
+ aIter = eventMap.find("_timestamp");
+ if (aIter != eventMap.end())
+ timestamp = aIter->second.asUint64();
+
+ auto_ptr<ConsoleEventImpl> eventImpl(new ConsoleEventImpl(CONSOLE_EVENT));
+ eventImpl->setAgent(this);
+ eventImpl->addData(data);
+ eventImpl->setSeverity(severity);
+ eventImpl->setTimestamp(timestamp);
+ if (data.hasSchema())
+ learnSchemaId(data.getSchemaId());
+ session.enqueueEvent(eventImpl.release());
+ }
}
@@ -514,9 +555,12 @@ void AgentImpl::sendQuery(const Query& q
msg.setReplyTo(session.replyAddress);
msg.setCorrelationId(boost::lexical_cast<string>(correlator));
- msg.setSubject(name);
+ msg.setSubject(directSubject);
+ if (!session.authUser.empty())
+ msg.setUserId(session.authUser);
encode(QueryImplAccess::get(query).asMap(), msg);
- session.directSender.send(msg);
+ if (sender.isValid())
+ sender.send(msg);
QPID_LOG(trace, "SENT QueryRequest to=" << name);
}
@@ -538,9 +582,12 @@ void AgentImpl::sendMethod(const string&
msg.setReplyTo(session.replyAddress);
msg.setCorrelationId(boost::lexical_cast<string>(correlator));
- msg.setSubject(name);
+ msg.setSubject(directSubject);
+ if (!session.authUser.empty())
+ msg.setUserId(session.authUser);
encode(map, msg);
- session.directSender.send(msg);
+ if (sender.isValid())
+ sender.send(msg);
QPID_LOG(trace, "SENT MethodRequest method=" << method << " to=" << name);
}
@@ -578,8 +625,11 @@ void AgentImpl::sendSchemaRequest(const
Message msg;
msg.setReplyTo(session.replyAddress);
msg.setContent(content);
- msg.setSubject(name);
- session.directSender.send(msg);
+ msg.setSubject(directSubject);
+ if (!session.authUser.empty())
+ msg.setUserId(session.authUser);
+ if (sender.isValid())
+ sender.send(msg);
QPID_LOG(trace, "SENT V1SchemaRequest to=" << name);
}
Modified: qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentImpl.h?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentImpl.h (original)
+++ qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentImpl.h Tue Feb 8 16:16:49 2011
@@ -29,6 +29,7 @@
#include "qmf/SchemaCache.h"
#include "qpid/messaging/Session.h"
#include "qpid/messaging/Message.h"
+#include "qpid/messaging/Sender.h"
#include "qpid/sys/Mutex.h"
#include "qpid/sys/Condition.h"
#include <boost/shared_ptr.hpp>
@@ -90,11 +91,13 @@ namespace qmf {
mutable qpid::sys::Mutex lock;
std::string name;
+ std::string directSubject;
uint32_t epoch;
ConsoleSessionImpl& session;
bool touched;
uint32_t untouchedCount;
uint32_t capability;
+ qpid::messaging::Sender sender;
qpid::types::Variant::Map attributes;
uint32_t nextCorrelator;
std::map<uint32_t, boost::shared_ptr<SyncContext> > contextMap;
Modified: qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentSession.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentSession.cpp?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentSession.cpp (original)
+++ qpid/branches/qpid-2935/qpid/cpp/src/qmf/AgentSession.cpp Tue Feb 8 16:16:49 2011
@@ -85,6 +85,7 @@ namespace qmf {
void complete(AgentEvent& e);
void methodSuccess(AgentEvent& e);
void raiseEvent(const Data& d);
+ void raiseEvent(const Data& d, int s);
private:
typedef map<DataAddr, Data, DataAddrCompare> DataIndex;
@@ -116,6 +117,8 @@ namespace qmf {
uint32_t minSubInterval;
uint32_t subLifetime;
bool publicEvents;
+ bool listenOnDirect;
+ bool strictSecurity;
uint64_t schemaUpdateTime;
string directBase;
string topicBase;
@@ -169,6 +172,7 @@ void AgentSession::response(AgentEvent&
void AgentSession::complete(AgentEvent& e) { impl->complete(e); }
void AgentSession::methodSuccess(AgentEvent& e) { impl->methodSuccess(e); }
void AgentSession::raiseEvent(const Data& d) { impl->raiseEvent(d); }
+void AgentSession::raiseEvent(const Data& d, int s) { impl->raiseEvent(d, s); }
//========================================================================================
// Impl Method Bodies
@@ -179,6 +183,7 @@ AgentSessionImpl::AgentSessionImpl(Conne
bootSequence(1), interval(60), lastHeartbeat(0), lastVisit(0), forceHeartbeat(false),
externalStorage(false), autoAllowQueries(true), autoAllowMethods(true),
maxSubscriptions(64), minSubInterval(3000), subLifetime(300), publicEvents(true),
+ listenOnDirect(true), strictSecurity(false),
schemaUpdateTime(uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())))
{
//
@@ -231,6 +236,14 @@ AgentSessionImpl::AgentSessionImpl(Conne
iter = optMap.find("public-events");
if (iter != optMap.end())
publicEvents = iter->second.asBool();
+
+ iter = optMap.find("listen-on-direct");
+ if (iter != optMap.end())
+ listenOnDirect = iter->second.asBool();
+
+ iter = optMap.find("strict-security");
+ if (iter != optMap.end())
+ strictSecurity = iter->second.asBool();
}
}
@@ -248,6 +261,8 @@ void AgentSessionImpl::open()
throw QmfException("The session is already open");
const string addrArgs(";{create:never,node:{type:topic}}");
+ const string routableAddr("direct-agent.route." + qpid::types::Uuid(true).str());
+ attributes["_direct_subject"] = routableAddr;
// Establish messaging addresses
setAgentName();
@@ -256,13 +271,20 @@ void AgentSessionImpl::open()
// Create AMQP session, receivers, and senders
session = connection.createSession();
- Receiver directRx = session.createReceiver(directBase + "/" + agentName + addrArgs);
+ Receiver directRx;
+ Receiver routableDirectRx = session.createReceiver(topicBase + "/" + routableAddr + addrArgs);
Receiver topicRx = session.createReceiver(topicBase + "/console.#" + addrArgs);
- directRx.setCapacity(64);
+ if (listenOnDirect && !strictSecurity) {
+ directRx = session.createReceiver(directBase + "/" + agentName + addrArgs);
+ directRx.setCapacity(64);
+ }
+
+ routableDirectRx.setCapacity(64);
topicRx.setCapacity(64);
- directSender = session.createSender(directBase + addrArgs);
+ if (!strictSecurity)
+ directSender = session.createSender(directBase + addrArgs);
topicSender = session.createSender(topicBase + addrArgs);
// Start the receiver thread
@@ -506,24 +528,50 @@ void AgentSessionImpl::methodSuccess(Age
void AgentSessionImpl::raiseEvent(const Data& data)
{
+ int severity(SEV_NOTICE);
+ if (data.hasSchema()) {
+ const Schema& schema(DataImplAccess::get(data).getSchema());
+ if (schema.isValid())
+ severity = schema.getDefaultSeverity();
+ }
+
+ raiseEvent(data, severity);
+}
+
+
+void AgentSessionImpl::raiseEvent(const Data& data, int severity)
+{
Message msg;
Variant::Map map;
Variant::Map& headers(msg.getProperties());
+ string subject("agent.ind.event");
- // TODO: add severity.package.class to key
- // or modify to send only to subscriptions with matching queries
+ if (data.hasSchema()) {
+ const SchemaId& schemaId(data.getSchemaId());
+ if (schemaId.getType() != SCHEMA_TYPE_EVENT)
+ throw QmfException("Cannot call raiseEvent on data that is not an Event");
+ subject = subject + "." + schemaId.getPackageName() + "." + schemaId.getName();
+ }
+
+ if (severity < SEV_EMERG || severity > SEV_DEBUG)
+ throw QmfException("Invalid severity value");
headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_INDICATION;
headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_DATA_INDICATION;
headers[protocol::HEADER_KEY_CONTENT] = protocol::HEADER_CONTENT_EVENT;
headers[protocol::HEADER_KEY_AGENT] = agentName;
headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF;
- msg.setSubject("agent.ind.event");
+ msg.setSubject(subject);
- encode(DataImplAccess::get(data).asMap(), msg);
+ Variant::List list;
+ Variant::Map dataAsMap(DataImplAccess::get(data).asMap());
+ dataAsMap["_severity"] = severity;
+ dataAsMap["_timestamp"] = uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()));
+ list.push_back(dataAsMap);
+ encode(list, msg);
topicSender.send(msg);
- QPID_LOG(trace, "SENT EventIndication to=agent.ind.event");
+ QPID_LOG(trace, "SENT EventIndication to=" << subject);
}
@@ -794,6 +842,17 @@ void AgentSessionImpl::dispatch(Message
const Variant::Map& properties(msg.getProperties());
Variant::Map::const_iterator iter;
+ //
+ // If strict-security is enabled, make sure that reply-to address complies with the
+ // strict-security addressing pattern (i.e. start with 'qmf.<domain>.topic/direct-console.').
+ //
+ if (strictSecurity && msg.getReplyTo()) {
+ if (msg.getReplyTo().getName() != topicBase || msg.getReplyTo().getSubject().find("direct-console.") != 0) {
+ QPID_LOG(warning, "Reply-to violates strict-security policy: " << msg.getReplyTo().str());
+ return;
+ }
+ }
+
iter = properties.find(protocol::HEADER_KEY_APP_ID);
if (iter != properties.end() && iter->second.asString() == protocol::HEADER_APP_ID_QMF) {
//
@@ -892,6 +951,11 @@ void AgentSessionImpl::send(Message msg,
{
Sender sender;
+ if (strictSecurity && to.getName() != topicBase) {
+ QPID_LOG(warning, "Address violates strict-security policy: " << to);
+ return;
+ }
+
if (to.getName() == directBase) {
msg.setSubject(to.getSubject());
sender = directSender;
Modified: qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEvent.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEvent.cpp?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEvent.cpp (original)
+++ qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEvent.cpp Tue Feb 8 16:16:49 2011
@@ -44,6 +44,8 @@ uint32_t ConsoleEvent::getDataCount() co
Data ConsoleEvent::getData(uint32_t i) const { return impl->getData(i); }
bool ConsoleEvent::isFinal() const { return impl->isFinal(); }
const Variant::Map& ConsoleEvent::getArguments() const { return impl->getArguments(); }
+int ConsoleEvent::getSeverity() const { return impl->getSeverity(); }
+uint64_t ConsoleEvent::getTimestamp() const { return impl->getTimestamp(); }
SchemaId ConsoleEventImpl::getSchemaId(uint32_t i) const
Modified: qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEventImpl.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEventImpl.h?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEventImpl.h (original)
+++ qpid/branches/qpid-2935/qpid/cpp/src/qmf/ConsoleEventImpl.h Tue Feb 8 16:16:49 2011
@@ -42,6 +42,8 @@ namespace qmf {
void addSchemaId(const SchemaId& s) { newSchemaIds.push_back(SchemaId(s)); }
void setFinal() { final = true; }
void setArguments(const qpid::types::Variant::Map& a) { arguments = a; }
+ void setSeverity(int s) { severity = s; }
+ void setTimestamp(uint64_t t) { timestamp = t; }
//
// Methods from API handle
@@ -56,6 +58,8 @@ namespace qmf {
Data getData(uint32_t i) const;
bool isFinal() const { return final; }
const qpid::types::Variant::Map& getArguments() const { return arguments; }
+ int getSeverity() const { return severity; }
+ uint64_t getTimestamp() const { return timestamp; }
private:
const ConsoleEventCode eventType;
@@ -66,6 +70,8 @@ namespace qmf {
std::list<Data> dataList;
std::list<SchemaId> newSchemaIds;
qpid::types::Variant::Map arguments;
+ int severity;
+ uint64_t timestamp;
};
struct ConsoleEventImplAccess
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org